ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 4 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 22 May 2017 My Price 8.00

Define the Employee constructor

Design and implement a class Employee in a java file called Employee.java. The class should contain instance variables for employee’s name, age, years Of Service.

Define the Employee constructor to accept and initialize instance data. The class should also keep track of the number of employee objects created using a static variable. This variable gets incremented every time in the constructor.

Include get and set methods for the three instance variables.
• Include a instance method called isEligibleForRetirement() that returns a boolean.
• true if the employee is eligible for retirement, false if not.
• For an employee to be eligible for retirement, the sum of age and years of service
needs to be greater than 60. 
• Create a client class called EmployeeApp (in a file called EmployeeApp.java) which has a main method.
• Using Scanner class, it will ask the user for data for 2 employees.
• i.e. name, age, and years of service for emp 1 and then emp 2.


• Take this user input and invoke the constructor of Employee class, passing the
user provided input as arguments. You now have 2 initialized Employee instances.


• Now, your main method should print the number of Employee objects created,
display data for each, and specify whether each employee is eligible for
retirement or not.

 

Assignment 4•Design and implement a classEmployeein a java file called Employee.java. The classshould contain instance variables foremployee’s name,age,yearsOfService.•Define theEmployee constructorto accept and initialize instance data. The class shouldalso keep track of the number of employee objects created using astatic variable. Thisvariable gets incremented every time in the constructor.•Includegetandsetmethods for the three instance variables.•Include a instance method calledisEligibleForRetirement()that returns aboolean.•trueif the employee is eligible for retirement,falseif not.•For an employee to be eligible for retirement, the sum of age and years of serviceneeds to be greater than 60.

Attachments:

Answers

(11)
Status NEW Posted 22 May 2017 01:05 AM My Price 8.00

-----------

Attachments

file 1495416904-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)