Menu

[solved]-Task Employee Record Purpose Create Multi Class System Populates Employee Records College Q39071172

project 01
Task: Employee Record Purpose: To create a multi-class system that populates employee records of a college. Problem: A collegPerson Create Person class that has the following specifications: o encapsulated data fields: i. name: stores the students nEmployee Create Employee class that stores the record of a person and has the following specifications: o encapsulated data fimage.pngTask: Employee Record Purpose: To create a multi-class system that populates employee records of a college. Problem: A college is currently updating its employee records. All records will consist of the name, age, office location, annual salary and the number of years employed. Currently, all the records have been entered in an inefficient way causing incomplete records to be maintained within their system. Solution: Create a multi-class system program that store and properly displays the information for employees in a formatted way on a console screen. Task Check List Create a package called college that contains a Person and Employee class. The Employee class will hold data for office location, annual salary and number of years employed. 0 The Person and Employee classes will contain accessor methods for their data fields along with a formatted string representation. o The Employee should be able to accept the name and age of a person as well as a person object. Employee records should also have a method called payments that divides their annual salary into 24 equal payments. O Create a client program called Departmentclient in tests to test the values passed to each constructor of the employee class and the output generated by their toString method. Within the client program create a method called print that displays the records of an Employee. Test with a few made up records to see if it runs correctly, public static void print (Employee employee) Person Create Person class that has the following specifications: o encapsulated data fields: i. name: stores the student’s name as a string. ii. age: stores the student’s age as an int. o constructors: i. create a constructor that accepts two parameters: name and age. public person(String name, int age) ii. create a constructor that accepts a parameter: a person object. This is a copy constructor. public person (Person other) o accessors: equals: returns true, if the contents of the current object is equal to the contents of another object, false otherwise. Use the instanceof operator to regulate the objects under comparison. public boolean equals (Object object) ii. getAge: retrieves the information in the age data field. public int getAge() iii. getName: retrieves the information in the name data field. public String getName() iv. toString: returns a person record. public String toString() Employee Create Employee class that stores the record of a person and has the following specifications: o encapsulated data fields I person: stores the name and age of a person and is of type Person. ii. office: stores an employee’s office location as a string. iii. salary: stores an employee’s annual salary as a double. iv. years: stores the number of years an employee has worked in the program as a double. o constructors I create a constructor that accepts five parameters: a name, age, office, salary and years. public Employee (String name, int age, String office, double salary, double years) ii. create a constructor that accepts four parameters: Person, office, salary and years. public Employee (Person person, String office, double salary, double years) iii. create an Employee copy constructor. public Employee (Employee other) o accessors o equals: returns true, if the contents of the current object is equal to the contents of another object, false otherwise. Use the instanceof operator to regulate the objects under comparison. public boolean equals (Object object) o getOffice: retrieves the information in the office data field. public String getoffice () We were unable to transcribe this imageShow transcribed image text Task: Employee Record Purpose: To create a multi-class system that populates employee records of a college. Problem: A college is currently updating its employee records. All records will consist of the name, age, office location, annual salary and the number of years employed. Currently, all the records have been entered in an inefficient way causing incomplete records to be maintained within their system. Solution: Create a multi-class system program that store and properly displays the information for employees in a formatted way on a console screen. Task Check List Create a package called college that contains a Person and Employee class. The Employee class will hold data for office location, annual salary and number of years employed. 0 The Person and Employee classes will contain accessor methods for their data fields along with a formatted string representation. o The Employee should be able to accept the name and age of a person as well as a person object. Employee records should also have a method called payments that divides their annual salary into 24 equal payments. O Create a client program called Departmentclient in tests to test the values passed to each constructor of the employee class and the output generated by their toString method. Within the client program create a method called print that displays the records of an Employee. Test with a few made up records to see if it runs correctly, public static void print (Employee employee)
Person Create Person class that has the following specifications: o encapsulated data fields: i. name: stores the student’s name as a string. ii. age: stores the student’s age as an int. o constructors: i. create a constructor that accepts two parameters: name and age. public person(String name, int age) ii. create a constructor that accepts a parameter: a person object. This is a copy constructor. public person (Person other) o accessors: equals: returns true, if the contents of the current object is equal to the contents of another object, false otherwise. Use the instanceof operator to regulate the objects under comparison. public boolean equals (Object object) ii. getAge: retrieves the information in the age data field. public int getAge() iii. getName: retrieves the information in the name data field. public String getName() iv. toString: returns a person record. public String toString()
Employee Create Employee class that stores the record of a person and has the following specifications: o encapsulated data fields I person: stores the name and age of a person and is of type Person. ii. office: stores an employee’s office location as a string. iii. salary: stores an employee’s annual salary as a double. iv. years: stores the number of years an employee has worked in the program as a double. o constructors I create a constructor that accepts five parameters: a name, age, office, salary and years. public Employee (String name, int age, String office, double salary, double years) ii. create a constructor that accepts four parameters: Person, office, salary and years. public Employee (Person person, String office, double salary, double years) iii. create an Employee copy constructor. public Employee (Employee other) o accessors o equals: returns true, if the contents of the current object is equal to the contents of another object, false otherwise. Use the instanceof operator to regulate the objects under comparison. public boolean equals (Object object) o getOffice: retrieves the information in the office data field. public String getoffice ()

Expert Answer


Answer to Task: Employee Record Purpose: To create a multi-class system that populates employee records of a college. Problem: A c… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *