Question: Classes and ArrayList Write a program that would print the information (name, date of joining salary, address) of three employees by creating a class named'

 Classes and ArrayList Write a program that would print the information

Classes and ArrayList Write a program that would print the information (name, date of joining salary, address) of three employees by creating a class named' Employee'. The output should be as follows: Emplovee Class: - String: Name - Dateloined: date int: year String: month int: day default constructor, getters, setters, and toString - String: Address - 1) Default constructor (Constructor that initializes attributes with its parameters) - 2) Empty constructor - 3) Copy constructor - 4) Setters \& Getters - 5) to String for each class Driver: 1. Instantiate 3 objects of Employee class and store them in an ArrayList 2. Display the information as shown in the output example above 3. Display the information of each of the 3 objects but exclude day and address. Do not change the structure of the class, simply call getter functions to get the required output. In some cases, shallow copy would be acceptable, but not for this case. For instance, if we refer to the Person/Car class we solved today in class, if 2 persons share the same car, then a shallow copy would be applicable in this case, such that if 1 driver changes some details (fields) of the car, both persons who share the same car would have this change in effect, since both persons share the same memory location of the same car object

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!