Solved

java + output screen + coding

Posted on 2004-11-01
193 Views
Last Modified: 2010-03-31
I need a layout screen for output using system.out.println

the criteria consist of.
current date, SSN Number
Employee name
Blank
Enter the number of IN/OuT
Blank
Enter the in and out times
blank
Enter y or n if there is any sick times used
blank
Display total hours worked
display total regular pay
display any overtime pay
blank
total pay
total hours worhed
0
Question by:gambit77
    7 Comments
     
    LVL 9

    Expert Comment

    by:DrWarezz
    Could you please specify the variables that need to be placed here???

    [r.D]
    0
     
    LVL 9

    Expert Comment

    by:DrWarezz
    >"
    Display total hours worked
    display total regular pay
    display any overtime pay
    "

    what are the formulas for this, etc..?
    0
     
    LVL 4

    Accepted Solution

    by:
    Not quite sure what you mean by "layout screen". If you mean the code to present the information as suggested, to System.out, it would be as follows:

    System.out.println(currentDate  +" ," + SSNNumber);
    System.out.println(employeeName);
    System.out.println();
    ...

    What are you looking for when you talk about "Enter the ..."? Do you also want code to read input and parse it? Why not use a dialog to input any needed values?
    0
     
    LVL 86

    Expert Comment

    by:CEHJ
    This sounds like homework/classwork ...
    0
     
    LVL 92

    Assisted Solution

    by:objects
    To display a prompt use:

    System.out.print("Employee name: ");

    To get input from the user use:

    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String input = in.readLine();

    To output a line use:

    int hours = 40;
    System.out.println("Hours worked: "+hours);


    That should get you started.
    Let me know of you have any questions.
    0
     
    LVL 4

    Expert Comment

    by:lcwiding
    I woudl recommend splitting between me and objects.
    0
     
    LVL 9

    Expert Comment

    by:DrWarezz
    No disagreement from me.
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Suggested Solutions

    Title # Comments Views Activity
    sum13 challenge 24 60
    has77  challenge 9 47
    ShiftLeft challenge 21 42
    hash value 2 22
    Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
    This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

    884 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now