Question: JAVA SCRIPT Write an Employee class with following properties: * name * address * salary 1. All member fields must be private. Provide getter and

JAVA SCRIPT

Write an Employee class with following properties: * name * address * salary 1. All member fields must be private. Provide getter and setter methods to access and modify each of the member fields.

2. Override the toString method to return the values of all the member fields. 3. In your main method create two instance of the Employee class.

4. Print the content of the Employee instances using System.out.println and the toString method

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!