View Single Post
Old 02-8-2012, 02:34 PM   #8
YoshL
Celestial Harbor
FFR Simfile AuthorFFR Music ProducerD7 Elite KeysmasherFFR Veteran
 
YoshL's Avatar
 
Join Date: Aug 2008
Location: Celestial Harbor
Age: 30
Posts: 6,156
Send a message via AIM to YoshL Send a message via MSN to YoshL Send a message via Skype™ to YoshL
Default Re: [College] Java 2 programming

Quote:
Originally Posted by rushyrulz View Post
Ok so breakdown time on how this thing is gonna run hypothetically:

Driver contains the main, so that's executed. Neat little menu pops up. User picks "Add Employee" option and is prompted:
1. hourly
2. salary
3. commission

Lets say they pick hourly, they are prompted
Enter Last Name:
Enter First Name:
Enter Middle Initial:
Enter Gender:
Enter Employee Number:
Full Time (y/n):
Enter Wage:
(there's a separate menu for adding hours)

All this information gets sent to a method in the EmployeeManager class called addEmployee.

Within this addEmployee class am I supposed to call the toString method of HourlyEmployee or what? Unfortunately, the teacher didn't provide a UML on the EmployeeManager class and kinda just left it up to us to come up with something that works.
well, first off, what does addEmployee return? that's a fairly important part.
and it shouldn't call toString at all. most likely you would create a new instance of the HourlyEmployee, and pass in all the values and things you need to the constructor, to create that.

also, are you supposed to be printing the info out or...? (lol this might be easier in chat)
__________________


Quote:
Originally Posted by Charu View Post
Only yours, for an easy price of $19.99! You too can experience the wonders of full motion rump sticking.
YoshL is offline   Reply With Quote