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

  Explain what will happen once these solutions are mixed

A solution of AgNO3 is mixed with NaCl to form a solution that is 0.10 M in AgNO3 and 0.075 M in NaCl. What will happen once these solutions are mixed

  Calculate the percentage in change in concentration

The polarogram for 20ml of solution that was 3.65*10^-3 in Cd2+ gave a wave for that ion with a diffusion current of 31.3µA . calculate the percentage in change in concentration of the solution

  Explain the allosteric enzymes isocitrate dehydrogenase

Which of the following compounds is a positive effector of the allosteric enzymes isocitrate dehydrogenase

  Draw bonding orbitals that result from combinations

Sketch bonding orbitals that result from combinations of the following orbitals on separate atoms (a) pz and dz2 (b) s and pz (c) dx2-y2 and dx2-y2

  How much heat was absorbed

In a calorimeter, 10.0 g of ice melts at 0oC. The enthalpy of fusion of the ice is 334 J/g. How much heat was absorbed?

  Explain the minimum reactor volume required if the reactor

If fluid inflow rate to a reactor is 6 liters/min, and the desired conversion is 85 % for a first order reaction in the reactant, A, what is the minimum reactor volume required if the reactor used is CSTR

  Describe why copper and iodide are incompatible in acid

Explain why copper (II) and iodide are incompatible in acid media and compatible in ammonia media

  Calculate the theoretical yield of cu(nh3)4so4xh2o

Calculate the theoretical yield of Cu(NH3)4SO4xH2O (MW=245.7) from the mass of the starting material (8.013g) CuSO4x5H2O (MW=249.7)

  Define what is the empirical formula of the compound

Combustion analysis of 2.400 g of an unknown compound containing carbon, hydrogen, and oxygen produced 4.171 g of CO2 and 2.268 g of H2O. What is the empirical formula of the compound

  Does the reaction result to form a precipitate

When solutions of the compound copper (ii) chloride and zinc nitrate are mixed, does the reaction result to form a precipitate, water, gas, or is there no reaction at all.

  Explain the active ingredient in aerosols that claim

Trichloroethane, C2H3Cl3, is the active ingredient in aerosols that claim to stain-proof men's ties. Trichloroethane has a vapor pressure of 100.0 mm Hg at 20.0 C and boils at 74.1 C

  Explain how many grams of dry nh4cl need to be added

How many grams of dry NH4Cl need to be added to 2.10 L of a 0.700 M solution of ammonia, NH3, to prepare a buffer solution that has a pH of 8.89? Kb for ammonia is 1.8*10^-5. mass of NH4Cl

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