Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Make a class of Employees that contains: the following data (String name , int age , double salary , Boolean isMarried , String address) make
- Make a class of Employees that contains:
- the following data (String name , int age , double salary , Boolean isMarried , String address)
- make 3 different constructor for this class { Employee() , Employee(String name , double salary) ,
Employee(String name , int age , double salary , Boolean isMarried , String address)
- make a different action in each constructor
- make a static variable that count the number of all the employee object created
- make a setter and getter method for each instance variable
- make 3 methods in this class :
- printRport : it will return all the data for the object in formatted way
- calculateAnnualSalary : this function will calculate the salary that the employee takes in one year
- static method that print the number of the employees
- create 5 objects of this class and store them in an array
- loop the array and print all the employees info using the printReport Function
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