Answered step by step
Verified Expert Solution
Link Copied!

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 :
    1. printRport : it will return all the data for the object in formatted way
    2. calculateAnnualSalary : this function will calculate the salary that the employee takes in one year
    3. 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

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

PC Magazine Guide To Client Server Databases

Authors: Joe Salemi

1st Edition

156276070X, 978-1562760700

More Books

Students also viewed these Databases questions