• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Needs help in editing

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


 
Bartender
Posts: 563
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make an effort and then come back when you run into problems.
 
Marshal
Posts: 69815
278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Posts: 69815
278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... and welcome to the Ranch
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic