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
Get step-by-step solutions from verified subject matter experts
