Salaries for a buisness

Assignment Help Chemistry
Reference no: EM13986326

Salaries for a buisness

You are assigned the task of creating a program for your boss that will help him keep track of his employee's salaries and ensure that an employee is not entering their salary twice.  There are two types of employee's full time and part time.

Implement a superclass named Employee that contains a salary instance variable, a getSalary method, and a 1-parameter constructor. The getSalary method is a simple accessor method that returns the salary instance variable's value. The 1-parameter constructor receives a weeklywage parameter and assigns a value to the salary instance variable based on this formula:

            salary = weeklywage * 52;

Implement two classes named FullTime and PartTime; they are both derived from the Employee superclass. FullTime should contain a fullhours instance variable (the employees hours per week). PartTime should contain a parthours instance variable (the employees hours per week). The FullTime and PartTime classes should each contain a 2-parameter constructor, an equals method, and a display method. In the interest of elegance and maintainability, don't forget to have your subclass constructors call your superclass constructors when appropriate. The display method should print the values of all the instance variables within its class.

Provide a driver class that tests your three employee classes. Your driver class should contain this main method:

public static void main(String[] args)

{

  FullTime FullT1 = new FullTime(3000.00, 50);

  FullTime FullT2 = new FullTime(3000.00, 50);

  if (FullT1.equals(FullT2))

  {

            FullT1.display();

  }

  PartTime PartT1 = new PartTime(1500.00, 20);

  PartTime PartT2 = new PartTime(1500.00, 20);

  if (PartT1.equals(PartT2))

  {

            PartT1.display();

  }

} // end main

 

Output:

Full Time: Salary = $156000.00, Hours worked per week = 50

Part Time: Salary = $78000.00, Hours worked per week = 20

Reference no: EM13986326

Questions Cloud

What is the maximum level of net benefits : Your firm's research department has estimated your total revenues to be R(Q)=3,000-8Q^2 and your total costs to be C(Q)=100+2Q^2. What is the maximum level of net benefits?
How many numbers without decimal points : How many numbers without decimal points must you select w/o replacement from the range [1, 101] in order to guarantee: that at least 1 odd number is chosen? that at least 1 even number is chosen?
Designing for reusability : Programming Essentials - Designing for Reusability Discuss the concept of reusability and how to design for reusability. Provide an example with your posting.
What is the best college to attend in the southern : What is the best college to attend in the southern region for computer science major
Salaries for a buisness : You are assigned the task of creating a program for your boss that will help him keep track of his employee's salaries and ensure that an employee is not entering their salary twice.  There are two types of employee's full time and part time
How much does the price of wine change measured in dollars : Suppose a bottle of French wine costs 70 francs. If the exchange rate moves from 6 francs /dollar to 7 francs / dollar, how much does the price of the wine change measured in dollars?
Evaluate the policies and doctrines that helped the us : Evaluate the policies and doctrines that helped the United States shift from isolationism to a Superpower during the middle of the 20th century. Be certain to include specific events, doctrines, and people to make your point
Class in my opinion determining the right time to upgrade : 1. Class in my opinion determining the right time to upgrade or replace a legacy system is one of the most difficult decisions an organization has to make in the IT environment. However, in today's IT environment, how can companies overcome challenge..
What was the most significant gain of the period : The Industrial Revolution brought with it a great deal of new technology, experiences and problems. In your opinion, what was the most significant gain of the period?

Reviews

Write a Review

Chemistry Questions & Answers

  Steps in the mechanism for the following reaction

Show all the steps in the mechanism for the following reaction, When benzene is mixed with deuterated sulfuric acid, deuterium is slowly incorporated onto the ring. Show the mechanism for this reaction and explain how this relates the sulfonation of ..

  Prior to placing piece of metal into the graduated cylinder

This assignment inhibits chemistry Laboratory Questions.

  Write the structures of the saytzeff elimination

Write the structures of the saytzeff elimination

  Calculate ph - chemistry questions

Chemistry Questions on Calculate P H

  How many mols of hydrogen can produce

how many mols of H 2 can produce

  Analysis of corrosion mechanisms

Analysis of corrosion mechanisms and preventative measures

  Chemical and pharmaceutical science

Write an equation for the formation of an acetal from reaction of excess methanol with benzaldehyde in the presence of an acid catalyst.

  Calculate the approximate sulphur

Calculate the approximate SO 2 mass emission in lb/day.

  What is the structure - stereochemistry

What is the structure (including functional groups)? Stereochemistry (racemic or single enantiomer)?

  Design a qualitative analysis scheme

Design a qualitative analysis scheme

  What will be the resultant pressure

What will be the resultant pressure when the stopcock is opened?

  The 1h nmr spectrum

Integrals for some of the resonances in the 1H NMR spectrum are higher than they should be due to the shear number of hydrogens in this compound

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