Question: Q1. - Create Employee Class and declare 2 instance variables employeelastname and employeenumber in it. - Create a constructor in the Employee class. Constructor receives
Q1. - Create Employee Class and declare 2 instance variables employeelastname and employeenumber in it. - Create a constructor in the Employee class. Constructor receives values in 2 local variables employeelastname and employeenumber. - Create main() method in Employee class. In main create an object of employee class and pass your name and number to the constructor. - In the constructor, assign the value stored in local variables employeelastname and employeenumber to instance variables employeefirstname and employeenumber. - In main() display the employeefirstname and employeenumber
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
