SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

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

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 6 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 08 Jan 2018 My Price 10.00

constructor which should set default values

Employee:

a) Write a class to represent an Employee. This should include the following:

i). Attributes for the Employee’s name (String), jobTitle (String), salary (float) and a unique employeeID (int). The salary should have a minimum value of 19000f.

ii). A default constructor which should set default values for all attributes.

iii). A second constructor which accepts and sets values for each of the attributes.

iv). Getter and setter methods for the name, jobTitle and salary.

v). A Getter method for the employeeID

vi). A method called showEmp() that takes no parameters, returns nothing and prints the information for each employee to the screen. (See sample output below).

vii). A method called toString()that returns a string representation of the attributes of an Employee (see sample output below for format)  

 

b) Write a main method in a new class called TestEmployee and in this method: i). Declare 3 Employee objects. Use the General Constructor for the first 2 Employees and the default constructor for the last employee. Details for Employee 1 and 2 are as follows: Num  Name   jobTitle   salary 1  “Tom Daly”  “Teacher”  45000 2  “Mary Murphy”  “Developer”  30000  
ii). Call the getName(), getJobTitle(), getSalary() and getEmployeeID() methods to print the information of the 2nd  Employee to the screen (it should be displayed exactly as the sample output below).  
iii). Call the setName(<…>), setJobTitle(<…>) and setSalary(<…>) method to change the information on the 3rd Employee to the following details:  
Num  Name    jobTitle   salary  3  “Michael Higgins”  “President”  1000  
iv). Use the showEmp() method to print all the information for all People to the screen (it should be displayed exactly as the sample output below).  
v). Call the toString() method on the 1st Employee object. 

(See attached)

 

Attachments:

Answers

(5)
Status NEW Posted 08 Jan 2018 01:01 PM My Price 10.00

-----------  ----------- 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

Not Rated(0)