Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

=+ (a) Show that P(U"_[X ,, = j i.o.]) =0 for all i.

Answered: 1 week ago