Write the code to implement given class

Assignment Help JAVA Programming
Reference no: EM131588980

Assignment

Write the code to implement this class. You MUST use the data and method names given as well as the types provided. You may implement the internal parts of the methods as you see fit. A (-) indicates that the data or method type is private. A (+) indicates that the data or method type is public. Your methods must be instance methods. The type indicates the return type, the parameter type or the data type, depending on where it occurs. You must use the constructors with fewer parameters to code the constructors with more parameters. We will work some of this in class.

Class: Employee

 

(-) surName : String

 

(-) givenName : String

 

(-) birthYear : int

 

(-) birthMonth : int

 

(-) birthDay : int

 

(-) streetAddress : String

 

(-) city : String

 

(-) state : String

 

(-) zipCode : String

 

(-) phoneNumber : String

 

(-) jobTitle : String

 

(-) salary : double

 

Last name of employee

 

First name of employee

 

Year

 

Month

 

Day

 

Address Ex: "123 My Street"

 

City Ex: Seattle

 

State Ex: WA

 

Zip Code Ex: 98124

 

Phone number Ex: 2536575431

 

Name of position Ex: Supervisor

 

Annual Pay  Ex: 75000.0

 

Constructors

Employee(surName, givenName)

 

Employee(surName, givenName, birthYear, birthMonth, birthDay)

 

Employee(surName, givenName, birthYear, birthMonth, birthDay, salary)

Constructor

 

Constructor

 

 

Constructor

 

Accessors (getters)

(+) getName( ) : String

 

 

(+) getSurName( ) : String

 

(+) getGivenName( )  : String

 

(+) getBirthDate( )  : String

 

 

 

 

 

(+) getStreetAddress( )  : String

 

(+) getCity( )  : String

 

(+) getState( ) : String

 

(+) getZipCode( )  : String

 

(+) getPhoneNumber( )  : String

 

 

(+) getJobTitle( )  : String

 

(+) getSalary( )  : String

 

 

 

 

(+) toString() : String

 

 

 

 

 

(+) equals(otherEmployee) : boolean

 

Return the name formatted as "surname, given name"

 

Return the surname

 

Return the given name

 

Return the birth date formatted as YYYY-MM-DD where the YYYY is the 4 digit year, the MM is the 2 digit month, and the DD is the 2 digit day.  You must pad with 0's if needed and you must have the "-"'s .

 

Return the street address

 

Return the city

 

Return the state

 

Return the Zip code

 

Return the phone number formatted as (xxx)-xxx-xxxx.  Where the x's represent the digits

 

Return the job title

 

Return the salary formatted as $xxxxx.xx where the x's represent the dollars and cents.  Cents must be two digits only and you must include the "$" sign.

 

Returns the String containing: The surname, the given name, the address, and the phone number. Where the names are on one line, the address is on three lines (street, city , state and zip) , and the phone number is on one line.

 

Returns true if the employee name (surname and given) and birthdate (year, month, and day)  are the same as the other Employee otherwise returns false

 

Mutators (setters)

(+) setSurName(String)

 

(+) setGivenName(String)

 

(+) setBirthYear(int)

 

(+) setBirthMonth(int)

 

(+) setBirthDay(int)

 

(+) setStreetAddress(String)

 

(+) setCity(String)

 

(+) setState(String)

 

(+) setZipCode(String)

 

(+) setPhoneNumber(String)

 

(+) setJobTitle(String)

 

(+) setSalary( double)

 

(+) raise(int)

 

Set or Replace the surname

 

Set or Replace the given name

 

Set or Replace the birth year

 

Set or Replace the birth month

 

Set or Replace the birth day

 

Set or Replace the street address

 

Set or Replace the city

 

Set or Replace the state

 

Set or Replace the Zip code

 

Set or Replace the phone number

 

Set or Replace the job title

 

Set or Replace the salary

 

Change the salary to reflect the raise as an increase of the given percent. The percent is in integer form where 100is 100 percent.

Reference no: EM131588980

Questions Cloud

Give an example of both an mo and signature : Describe the background of each. For example, what are the driving forces or reasons behind a criminal's MO and signature?
Maximize profit and the author : Is there a "conflict of interest" between the publisher who wants to maximize profit and the author who wants to receive as large an income as possible?
Contrast on the impact of internet and social media on kids : contrast on the impact of internet and social media on kids and parents game habits
Analyze the need for jury sequestration in a capital offense : Defend or critique the idea that jurors are rarely punished for misconduct. Provide a rationale with two (2) examples to support your position.
Write the code to implement given class : Write the code to implement class. You MUST use the data and method names given as well as the types provided. You may implement the internal parts
Describe a work report that you are required to complete : Describe a work report that you are required to complete on a regular basis. How would you present the information related to this report in a visual manner?
Calculate the number of firms at the lrce : Calculate the market price and market output at the LRCE. Calculate the number of firms at the LRCE.
Prepare the adjusting entry to record income tax expense : Hubler Company reported pretax accounting income of $45 million in 2017, Please prepare the adjusting entry to record income tax expense, income tax payable
Discuss your communication gaps : Discuss your communication gaps. Analyze how you can improve your current communication skills to prepare you for advancement in your profession.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd