Create a class person and clerk derived from person

Assignment Help JAVA Programming
Reference no: EM132077726

Create a class Person and Clerk derived from (a sub class of) Person. The Person class should have instance variables and Clerk class should have the additional information of a salary and an employmentgrade.

Eg, a clerk's employment grade might be (CR-1, CR-2, etc.) Both class should have the accessors, mutators and a toString() method. The toString() method in Clerk class will include a call the toString() method of the super class(Person).

A Person Has A Telephone, Address, Name, Email

The Clerk class will have an equals() method. It must override the equals method of the parentclass(Person). The equals method in the Person class to override the equals method in the Object class. We considered the difference between using == and equals() method with String objects.

Any class can, and should, define its own equals method. So, what does it mean that one clerk equals another clerk? We can define this such as two Clerk objects are equal, if they have the same salary and grade.

So, clerk1.equals(clerk2) will return true if their salary and grade are "equal" by the definition. You might notice that when comparing String objects, you must use the equals method defined in the String class, as opposed to the relational == operator.

The equals method MUST accept an Object as its parameter.

2) Create a .java file and use it to demonstrate following minimum:

- Your clerk Class is functioning, and the methods are correct. Create several clerks, compare them to each other using the equals method, and output clearly when one object is equal to another. Print out the objects as well

- You can output the address of a clerk object

- You can change the zip code of a clerk object and print zip code before and after change.

Reference no: EM132077726

Questions Cloud

How much would the value of samsung increase : Samsung currently has no debt and a cost of equity of 25%. They are thinking about issuing debt to buy back some of their equity.
What will the annualized yield be : Sara has decided to invest in commercial paper with a par value of $1,000,000 and a 60-day maturity for $990,000. If Sara decides to hold this investment.
Find the rate of change of the demand : If the price is increasing at a rate of 2 dollars per month when the price is 10 dollars, find the rate of change of the demand.
What rate is the current changing : When the resistance is 400 ohms and the current is 0.01 amperes, at what rate is the current changing?
Create a class person and clerk derived from person : The Person class should have instance variables and Clerk class should have the additional information of a salary and an employmentgrade.
Calculate the npv of the given project : Sanders Enterprises, Inc., has been considering the purchase of a new manufacturing facility for $276,000. The facility is to be fully depreciated.
Find the rate of change of the distance : Find the rate of change of the distance from the particle to the origin at this instant.
What command would you use to save the file : Create a document with four lines, each containing the word "today." What command would you use to copy the first four lines using only one command?
Right circular cone of radius r : Suppose that a right circular cylinder of radius r and height h is inscribed in a right circular cone of radius R and height H.

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