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

  What is the value of x after x = myary.length

Write a code to initialize myary1 beginning with myary1[0][0] = 1 and adding one for each subsequent array location.

  Was the code does syntactically right

Access the array 4 Java program. Code, compile, and run the program. There are four lines of code marked (1)..(4) that you must explain after analyzing the code, running the program, and examining the output.

  Achieve these two important features

Java TM is a portable language, and being an object-oriented programming language, it also encourages component reusability. How does Java TM achieve these two important features

  Design a class named cryptgram java with given requirements

Design a class Named CryptGram.java with given requirements: Data Members: a Letter array named orderedFrequency to store frequency of 26 alphabetic letters.

  Assume the existence of a function copyvillian

Show how you would use the above copyVillian function to create a copy of sharpay called sharpaysMoreEvilTwin.

  Create a test application that creates a controller object

Create a test application that creates a controller object and play the game! Experiment with changing the game parameters and observe how the game reacts

  Write a java program which reads a text file

Please provide answer for below homework assignment. It is for JAVA and i use Dr. Java. also request it be //commented per java doc standards*/.

  Write a java tcp socket program to do tcpsocket server

Write a Java TCP socket program to do TCPSocket server. When starts the server, IP address of the machine must be displayed so the client can use to connect.

  Int variable with a boolean variable

In java programming Can we compare int variable with a boolean variable?

  Menu based program to maintain student records

Write a menu based program to maintain student records. Your program should take the following inputs: 1. Student first name (max. 20 characters) 2. Student last name, (max. 20 characters) 3. Student scores (float/double), eg. 85.4 Problem

  Controlling and using the paintcomponent ( ) method

How to paint the screen -Controlling and using the paintComponent ( ) method Deliverables app.java, myJFrame.java, myJPanel.java,  and other necessary Java files

  Create a student class and driver

Create a Student Class and Driver. List of Courses Taken (you may use an ArrayList type, or a linked list). will display all of the students in the formatted form.

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