![]() Constants for the day and night shifts. Public class ProductionWorkerA extends EmployeeA ProductionWorkerA Class import java.util.* String str = "Name: " name "\nEmployee Number: " ![]() ToString A reference to a String representation of The getName method returns the employee's The employee's name.Įmployee's hire The employee's hire date.Įmployee e The string containing an true if e references a valid ID number, The setHireDate method sets the employee's The setEmployeeNumber method sets the e The employee's number. The setName method sets the employee's n The employee's name. Null strings for name, employee number, and hire The no-arg constructor initializes an object with Public Employee(String n, String e, String h) This constructor initializes an object with a name,Įmployee number, and hire n The employee's e The employee's h The employee's hire date. ![]() Demonstrate the classes by writing a program that uses a ProductionWorker object Write one or more constructors and the appropriate accessor and mutator methods for the class. The day shift is shift 1 and the night shift is shift 2. The shift field will be an integer value representing the shift the employee works. The workday is divided into two shifts: day and night. The ProductionWorker class should have fields to hold the following information: Next, write a class named ProductionWorker that inherits from the Employee class. The class should keep the following information in fields:Įmployee number in the format XXX-L, where each X is a digit within the range 0-9 and the L is a letter within the range A-M. The progam should Design a class named Employee. I am having problems with the output of my program.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |