Question: Write a Java program to show the following. Create an interface called Details. The Details interface has 2 methods namely, - Input - Output Create

Write a Java program to show the following. Create an interface called Details. The Details interface has 2 methods namely, - Input - Output

Create a class called Employee which implements Details interface. Write the implementation for the methods Input and Output methods within the Employee class.

The Employee class has 3 class variables namely,

- employee name

- employee ID

- employee Social Security Number

- employee contact address

- employee contact number

Within the Input method implementation in Employee class, assign the values to the 5 class variables mentioned above.( Assigning values to variables of Employee class could be done by using Scanner class or you can assign the values to variables directly. Using Scanner class to get user input and assigning them to Employee class variables is preferred)

Within the output method implementation in Employee class, print all the 5 Employee class variables along with their corresponding values.

Create an object for the Employee class and invoke the Input and Output methods.

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!