Convert javaline to normal english

I need to write a program that can convert a simple line of java into pseudocode. For example, if the user is to input "long hoursWorked = 40;", the output must be something similar to "Variable hoursWorked declared as a long integer datatype and initialized to 40".
All I need is an example to get me started. :(

If I gave an impression that I'm asking people to do all the work, I'm sorry.
So far, I've got the following:
import element.*;
public class a {
public static void main(String[] args) {
ConsoleWindow c = new ConsoleWindow(); // opens console window
String inputLine, outputLine;
c.out.println("Enter a line");
inputLine = c.input.readString();
c.out.println("You have entered: "+ inputLine);
if (inputLine.endsWith(";"));
{outputLine="Is a java line";
    c.out.println(inputLine + " is a valid line of java");}
if (inputLine.startsWith("int")) //if the input is an int expression
{outputLine="This is an integer datatype";
    c.out.println("This is an integer datatype");} //this will come out
if (inputLine.startsWith("double")) //double
{outputLine="This is a double number datatype";
    c.out.println("This is a double number datatype");}
if (inputLine.startsWith("long")) //long
{outputLine="This is a long integer datatype";
    c.out.println("This is a long integer datatype");}
if (inputLine.startsWith("short")) //short
{outputLine="This is a short integer datatype";
    c.out.println("This is a short integer datatype");}
if (inputLine.startsWith("char")) //char
{outputLine="This is an alphabetical character datatype";
    c.out.println("This is an alphabetical character datatype");}
It looks horrible, I know, but trying to absorb java within a week isn't my kind of thing.
Someone suggested to use substrings, but I can't seem to get to grips with it.

Similar Messages

  • How to convert chinese numbers into english?

    Hi
    I would like to know is there any API or code available to convert Chinese Numbers to English numbers.
    ex: chinese input is 萬一三
    i should convert this to 10013.
    Regards
    Suresh

    I would try using a numberFormat, but I don't know if it can parse a String with chinese characters.
    import java.util.Locale;
    import java.text.NumberFormat;
    NumberFormat formarter = NumberFormat.getInstance(Locale.CHINA);
    int number = formarter.parse(String);

  • Convert smartforms to normal form

    hi is it possible to convert smartform to normal form ?

    Hi
    Be more clear normal forms in the sense?
    Regards,
    Sree

  • Needs help on converting arabic word to english

    Hello every body,
    we have a requirement like ..some part of the strings in arabic we need to convert into english.Could u plz help me how to do.../if anybody have an example related to this requirement ..plz post a link.
    Thanks ,
    Anil.

    So, I wanted to add an addendum to this, after importing the file into Pages 09', I noticed I no longer had the ability to use the Section and Page break inserts. This is odd, and I believe I found out why. In Pages 5, that system of Sections and inserting blank pages works differently, with different templates. Once back into Pages 09', you simply have to create a blank page, and then use the "Capture page" option to make this your new Section insert/blank page insert, and then you have your formatting options restored.
    I'm currently fighting to get Table of Contents to format properly, as that function seems to have been banjaxed after the Pages 5 export into 09', so once I find a work around or a solution, I'll post that as well. Everything else seems to function as it had before, from slapping shapes in, to text boxes, tables, and page numbering. The Table of Contents works, but there isn't a label saying "Table of Contents" bolded, and the spacing and such for the listings aren't really... nice looking like they are normally.
    So, like I said, once I find out how, I'll post an update.

  • How convert to word in English words not code

    How do I convert a PDF file to Word in English? All I get are codes I can't read.

    What means "code"; can you post a screenshot of what you see: https://forums.adobe.com/thread/1070933 - maybe you are not opening the converted document in Word?
    If you want to unsubscribe: http://helpx.adobe.com/x-productkb/policy-pricing/cancel-subscription-acrobat-online-servi ces.html
    [topic moved to ExportPDF forum]

  • To convert special characters to English characters.

    Is there any functional module to convert special characters(Latin) to English characters?

    Hi Meera,
         Welcome To SDN!!
    try using the function module 'SCP_REPLACE_STRANGE_CHARS'.
    Give the variable with special characters in intext.
    Regards
    Kiran Sure

  • Convert different language into english through javascript

    Hi All,
    Is there any way that i can change the language written in textfield of sample pdf template??
    suppose amount in words written in russian language and i want it in english in some other text field is it possible?
    Please reply for this if you have something on this issue
    Regards
    Abhishek

    Hi C,
    Thanks for your reply.
    I would like to know the java script for converting language. If you know the answer then it would be a greater assistance to us.
    Regards
    Abhishek

  • How to Convert Latin Character into English

    Hi Experts,
    Can you please suggest how to covert Latin Characters into English like- ó to o, ú to u and so on.is there any FM ??
    Logic: Jesúsó converted to --> Jesuso

    Pre unicode, I used the TRANSLATE statement. Post-unicode, there's no problem with these characters. What are you doing with them that requires the stripping out of accents etc.?

  • How do you convert arabic format to English format in InDesign so bullets are on the left side?

    I received a document from a client to work on that was created in InDesign with english format. For some reason, when they sent it to me the bullets were converted to arabic format, so they are on the left side not right. Is there an easy way to convert it back?

    You will likely get better program help in a program forum InDesign
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • Convert UTC in plain English

    Does anyone know how to convert UTC to day, month, and year in plain English?  What I mean is, others have asked this question and received technical responses that call for the use of some ABAP and some functions.  I don't need the ABAP code, I just need to understand it better so I can do a few simple conversions off-line on paper.
    Thanks!

    If you are using iTunes 7 I think this section from the Apple article is pretty straightforward.
    To transfer iTunes Store purchases using iPod:
    Connect your iPod to the computer on which you bought the items you want to transfer.
    Copy the iTunes Store purchases to your iPod.
    Disconnect your iPod (click the Eject button next to its icon) and then connect it to the computer you want to transfer the purchases to.
    Choose File > Transfer Purchases From iPod.
    You could also burn the song files to a data CD or DVD. Once you've burned the disc, take it to your other computer and import the songs into iTunes. Don't forget that regardless of which method you use, both computers have to be authorised to play the songs: About iTunes Music Store Authorisation and Deauthorisation

  • Convert from Spanish to English

    Hi Everyone, I have a question on Language conversion.
    How can you convert Spanish from the Oracle database to English in the front end using Java?

    JoachimSauer wrote:
    Ren2407 wrote:
    Hi Everyone, I have a question on Language conversion."language conversion" is traditionally called "translation".
    How can you convert Spanish from the Oracle database to English in the front end using Java?Not easily and not programatically, unless you accept a poor translation.
    Are you aware that translating some text in one language to another is a very complex task? Research groups are working on this for quite some time now and no great solution was found yet (some semi-working ones are around, 'though).Exactly. A common misconception amongst some people is that simply mapping a Spanish word to its equivalent English word will be sufficient, which of course, even if an exact 1:1 map of all words existed (which it doesn't), wouldn't work

  • Convert template to normal pages doc?

    Is there anyway to convert a template to a normal pages doc so that you can edit the background and fixed content etc? (I need to get the background of a template)

    Create a new Pages document and select the template whose image you seek. Click once on that image, and then copy it to the clipboard. Launch Preview, and from the File menu, choose New from Clipboard. From Preview, save the image.
    Most Apple supplied templates have text that is placeholder text, and images that are placeholder images. That means you can click on the text to edit it, especially the Latin Lorem Ipsum stuffing, and drag/drop an image over an existing one to auto-size and replace. You will know it is placeholder text when you click on it and the background color of the text turns a coral color.

  • Why does Adobe ExportPDF fail to convert to Word in English (UK)?

    On 7 October 2014 I purchased and added to my MacBook Air Adobe ExportPDF. The PDF document (in English) has uploaded three times for Conversion to Word in English (UK) but three times "Conversion Failure" is the result. Do I need to cancel my purchase?

    Hi,
    If it is showing 'conversion failure' error,you can try using different browser.
    Please let us know if you require further assistance.
    Regards,
    Florence

  • How do you convert numeric values into english words?

    I am interested in creating a field in adobe acrobat that references a total dollar amount field. I want the java script to convert the numeric number into a written word, such as $59.59 as Fifty Nine and 59/100. I have no experience writing java script code and would really like some help on how this can get done. Its also important to embed in the programming that if their is no numeric value to reference, then nothing get referenced. This means an empty text box. Thanks for any help.

    Im using the below script...... I'm a complete novice at this and helping a friend out with it.
    Any info is appreciated.
    aTens = [ "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"];
    aOnes = [ "Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine",
      "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen",
      "Nineteen" ];
    function ConvertToHundreds(num)
       var cNum, nNum;
       var cWords = "";
       num %= 1000;
       if (num > 99) {
          /* Hundreds. */
          cNum = String(num);
          nNum = Number(cNum.charAt(0));
          cWords += aOnes[nNum] + " Hundred";
          num %= 100;
          if (num > 0)
             cWords += " and "
       if (num > 19) {
          /* Tens. */
          cNum = String(num);
          nNum = Number(cNum.charAt(0));
          cWords += aTens[nNum - 2];
          num %= 10;
          if (num > 0)
             cWords += "-";
       if (num > 0) {
          /* Ones and teens. */
          nNum = Math.floor(num);
          cWords += aOnes[nNum];
       return cWords;
    function ConvertToWords(num)
       var aUnits = [ "Thousand", "Million", "Billion", "Trillion", "Quadrillion" ];
       var cWords = (num >= 1 && num < 2) ? "Dollar and " : "Dollars and ";
       var nLeft = Math.floor(num);
       for (var i = 0; nLeft > 0; i++) {
           if (nLeft % 1000 > 0) {
              if (i != 0)
                 cWords = ConvertToHundreds(nLeft) + " " + aUnits[i - 1] + " " + cWords;
              else
                 cWords = ConvertToHundreds(nLeft) + " " + cWords;
           nLeft = Math.floor(nLeft / 1000);
       num = Math.round(num * 100) % 100;
       if (num > 0)
          cWords += ConvertToHundreds(num) + " Cents";
       else
          cWords += "Zero Cents";
       return cWords;
    You can use the following script for the custom calculation for the words field when the number field is named "Number":
    event.value = "";
    var f = this.getField("Number");
    if(f.valueAsString != "") {
    event.value = ConvertToWords(f.value);

  • Converting German Keyboard to English Keyboard Yoga 13

    Hello,
    I received a German lenovo laptop as a gift. I wanted to know if I can order an english lenovo keyboard and physically replace the German keyboard and expect everything to function (of course changing the keyboard settings to English).
    Thank you!
    Dan

    It will be full compatible.

Maybe you are looking for

  • URGENT!!!! Mail won't display my RSS feeds anymore

    Hello, I recently deleted a RSS feed but my mail froze. After restarting the Mail app I couldn't find any of my RSS feeds anymore. I thought that maybe I accidently deleted all my RSS so I tried re-adding all my RSS feeds but even that did't work. Pl

  • Workflow in Purchase Order / Purchase Requisition

    Hello guys, My client has a requirement that there will be release strategy applied on Purchase Order. this will be one level approval. But the approver should have ability to add an adhoc approver for this Purchase Order. Can anyone tell me how this

  • Compare String in a table and insert the common values into a New table

    Hi all, Anyone has idea on how to compare a string value in a table. I have a Students Table with Student_id and Student_Subject_list columns as below. create table Students( Student_id number, Student_Subject_list varchar2(2000) INSERT INTO Students

  • WRT610N wired 1Gbits drop to 100Mbits after a while

    I start my computer running XP SP2 and the router wired port 1 (the only wired) show connected green (this mean 1Gbits until they fix it) and all seems fine. After an hour or two I see a message near the time about network diconnect then reconnect th

  • At line selection in module pool

    Hello Experts. I am working on module pool. I have created a transaction where I need to create a order number when I press the 'SAVE' button. My order number is getting created but my issue is I need to call a transaction when I click on this order