Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: I Need Help With A Java Assignment...

  1. #1
    Junior Member
    Join Date
    Oct 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default I Need Help With A Java Assignment...

    I'm incredibly new to Java, currently taking an Into level college course. However, I'm completely lost. The program I need to write is supposed to have one default constructor as well as getters and setters. The two variables I'm to be concerned with are hoursWorked and payRate.There should be a setter for each variable and a getter for each variable that returns the variables contents. There should also be a getter which returns the gross pay by calculating hoursWorked by payRate. If the hoursWorked is more than 40, the extra time is multiplied by 1.5.

    Following this, I need to create a new file that needs to create a new object of the Payroll class. The program should then accept user input for both the number of hours worked and the pay rate and store that data using the setters (methods) from File 1. The program should then print out the users gross pay in the following format $00.00.

    I'm completely lost. If anyone has any tips, tricks, or words of wisdom for me....it would be greatly appreciated.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 697 Times in 679 Posts

    Default Re: I Need Help With A Java Assignment...

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

    You've listed the required steps that plot a fairly easy to follow path. What is preventing you from following those instructions? Take the steps one at a time and forget that the whole project seems overwhelming.

Similar Threads

  1. Behaviour of shortcut assignment and normal assignment for float
    By rakeshkr2 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 20th, 2014, 02:54 AM
  2. Replies: 8
    Last Post: February 12th, 2013, 04:45 AM
  3. assignment troubles polymorphism (guide for assignment included)
    By tdawg422 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 8th, 2011, 10:01 AM
  4. my java assignment -- please help
    By java_beginner in forum Java Theory & Questions
    Replies: 6
    Last Post: May 20th, 2010, 08:32 AM
  5. Replies: 1
    Last Post: February 22nd, 2010, 07:20 AM