• Log in or sign up for an account here: https://www.sythe.org/login

Need help with Java homework.

Status
Not open for further replies.
<3 n4n0
Discord Verified
Two Factor Authentication User
Community Participant
Spam Forum Participant
Sythe's 10th Anniversary
Sythe Awards 2011 Winner
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:
 
I have 1,3,4,5,6,9,10, and 11. If anyone knows how to do the other ones, please help.
 
<3 n4n0
Discord Verified
Two Factor Authentication User
Community Participant
Spam Forum Participant
Sythe's 10th Anniversary
Sythe Awards 2011 Winner
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;
}
 
Status
Not open for further replies.
duelarena.gg
Back
Top