This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Needs help in editing Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Needs help in editing" Watch "Needs help in editing" New topic
Author

Needs help in editing

Marry Ann
Greenhorn

Joined: Jun 23, 2011
Posts: 1
Hi guys: Can any one please help me how to i do the changes in my program according to the following 4 changes.

1) Create a Date type birth data instance field in the Employee class, not a String

2) Enlarge the constructors for the Employee class and subclasses to pass the int month, int day, and int year of the birth date as input by the user to PayrollSystemTest

to the subclass constructor, and then to the Employee class constructor

3) Input from the user for the 5 specific employees and then comment out the hardcoding for the 4 employees in the original code

4) Report monthly salary amounts and include the November birthday bonus


Greg Brannon
Bartender

Joined: Oct 24, 2010
Posts: 530
Make an effort and then come back when you run into problems.


Learning Java using Eclipse on OpenSUSE 11.2
Linux user#: 501795
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32833
    
    4
You cannot pass data to a subclass anything. What it means is you are extending the class, and in the extended class (the subclass) you take day month year as parameters. In fact I think it would be better to put the date fields in the superclass (all Employess have a date of birth) and use
super(day, month, year, name, etc); in the subclass constructor.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32833
    
    4
... and welcome to the Ranch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Needs help in editing
 
Similar Threads
Code problems
cannot understand the point of downcasting in the following code
java.util.UnknownFormatConversionException: Conversion = 'i' error
how to test/run a simple inheritance hierarchy in Eclipse
Requiring boolean...