Need help with Java homework.

Discussion in 'Archives' started by Pen, Jan 13, 2009.

Thread Status:
Not open for further replies.
Need help with Java homework.
  1. Unread #1 - Jan 13, 2009 at 10:31 PM
  2. Pen
    Joined:
    Nov 6, 2005
    Posts:
    15,220
    Referrals:
    141
    Sythe Gold:
    5

    Pen Legend
    Banned

    Need help with Java homework.

  3. Unread #2 - Jan 13, 2009 at 10:39 PM
  4. XxFallenSoulxX
    Joined:
    May 28, 2007
    Posts:
    402
    Referrals:
    0
    Sythe Gold:
    0

    XxFallenSoulxX Forum Addict

    Need help with Java homework.

    z0mg so komplicated!!! java isnt for me >.< but if i knew java i would help :D
     
  5. Unread #3 - Jan 13, 2009 at 10:49 PM
  6. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Need help with Java homework.

    Could have posted in java section to liven up proogramming... :(


    Anyways... I can try to help? Would be nice if i could copy and paste into notepad or something but i can try... :/


    1:

    Code:
    {
    this.familyName = lastName;
    this.firstName = givenName;
    this.idNumber = id;
    if(hrs < 0)
    {
    this.hoursWorked = 0;
    }
    else if(hrs > MAXIMUM_HOURS)
    {
    this.hoursWorked = MAXIMUM_HOURS;
    }
    else
    {
    this.hoursWorked = hrs;
    }
    if(wage < MINIMUM_WAGE)
    {
    this.hourlyWage = MINIMUM_WAGE;
    }
    if(dependants < 0)
    {
    this.numberOfDependants = 0;
    }
    else if(dependants > MAXIMUM_NUMBER_OF_DEPENDANTS)
    {
    this.numberOfDependants = MAXIMUM_NUMBER_OF_DEPENDANTS;
    }
    else
    {
    this.numberOfDependants = dependants;
    }
    
    }
    
    

    Thats one... i kinda have to go to sleep... i will try and edit another one in before i go...


    13:

    Code:
    {
    if(manager)
    {
    return firstName + " " + lastName + ", " + getDeptCode() + "\n$" + getPaycheck();
    }
    else
    {
    return firstName + " " + lastName + ", " + getDeptCode() + "\n$" + getPaycheck() + ", hours worked = " + hoursWorked;
    }
    
    BTW: CP I SEE YOU!!! D:


    EDIt... would do more, but dad i telling me to go to sleep... it would have been faster if i could have copied and pasted... D:
     
  7. Unread #4 - Jan 13, 2009 at 11:56 PM
  8. Pen
    Joined:
    Nov 6, 2005
    Posts:
    15,220
    Referrals:
    141
    Sythe Gold:
    5

    Pen Legend
    Banned

    Need help with Java homework.

    I have 1,3,4,5,6,9,10, and 11. If anyone knows how to do the other ones, please help.
     
  9. Unread #5 - Jan 14, 2009 at 11:14 AM
  10. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Need help with Java homework.

    2:

    Code:
    {
    hoursWorked = STANDARD_WEEKLY_HRS;
    hourlyWage = MINIMUM_WAGE;
    numberOfDependants = 0;
    manager = false;
    this.familyName = lastName;
    this.firstName = givenName;
    this.idNumber = id;
    }
    
    7:

    Code:
    if(raise > 0)
    {
    hourlyWage += raise;
    return true;
    }
    else
    {
    return false;
    }
    
     
< Selling Pure/Skiller!!! Look Here! | sell pure 43 cb ranger awsome name >

Users viewing this thread
1 guest
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site