Question
Create a Java program with an Employee class and a Manager class. Create an Employee class, and in that class, declare variables employeename, employeeageinyears, employeestaffnumber,
Create a Java program with an Employee class and a Manager class. Create an Employee class, and in that class, declare variables employeename, employeeageinyears, employeestaffnumber, employeefirstlineofaddress, and employeesecondlineofaddress. All the variables should be declared as instance (not class) variables. In the Employee class, create a non-static method calculateageindays() and use that method to calculate your age in days (see the details below!). In the Employee class, create a non-static method calculatefulladdress() and use that method to calculate Full Address of the studentyour age in days (see the details below!). Create a Manager class and inside that class, create main() method. Inside the main() method create an object of the Employee class with object name as yourname. Using the object you have created, set/record employeename as YOUR NAME, employeeageinyears as YOUR AGE, employeestaffnumber as YOUR STUDENT NUMBER. From the main() method of Manager class, call calculateageindays() method of the Employee class and send employeename and employeeageinyears as parameters (arguments) in the call to the called method calculateageindays().
Inside the calculateageindays() method, make use of the age received in the call from the main() method in years, assume that an years is 365 days, and calculate the age in days. Display the age in days along with the name received from the main() method as follows: YOURNAME has an age of #### days From the main() method of Manager class, call calculatefulladdress() method of the Employee class and send employeefirstlineofaddress and employeesecondlineofaddress as parameters (arguments) in the call to the called method calculatefulladdress(). Inside the calculatefulladdress() method, make use of the first line of address and second line of address received in the call from the main() method and concatenate them both to display the full address on the console. Include source code, and a screenshot of the code from the IDE and the output in your
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started