Use a loop in main to efficiently handle all three persons

Assignment Help C/C++ Programming
Reference no: EM13315594

Stinclude <iostream>

It include <fstream> // use this if you want to read the data from a file; otherwise you can omit it using namespace std;

class Employee

private:

int id, nodependents;

char status; // 'W' salaried worker, 'A' apprentice

double hours[5]; // array to hold hours worked in a normal week

double standardrate; double SumUpHours();

double CalculatePaycheck(); // total hours times standard rate (except apprentices earn

/1 only 78.5% of the standardrate), minus deductions

double CalcDeductions(double gross); /1 Deductions are 22.0% of total pay for Federal Tax withholding, and // $75.25 for each dependent for health insurance

public:

Employee(); // the constructor. Initialize the standardrate to be 41.75

void SetPersonalData(); // stores the id number, no. of dependents, and status void InputHours(); // store the five weekday hours

double GetTotalHours();

double GetPaycheck();
};

int main()

Employee person[3];

int p;

cout.setf(ios::fixed);

cout.setf(ios::showpoint); cout.precision(2);

Plan and finish writing the main program, and all the functions, including a constructor. Use a loop in main to efficiently handle all three persons' data. Make use of all the private and public member variables and functions set up in the class definition of Employee. Read in input only from inside the functions SetPersonalData and InputHours, and write out the results only from the main program. The results should look like what's shown below.Test your program using, for example, the data

553 2 W
8.0 4.0 8.0 4.0 6.0

491
10.0
297
5.0 0 W
12.0 8.0 10.0
1 A
4.0 6.0 6.0 9.0

2261_database.png


or any similar data. The hours don't have to be whole numbers. they could be 5.5 14.2 9.8 6.5

Reference no: EM13315594

Questions Cloud

How you would present some of the best practices in security : Detail how you would present some of the best practices in security, including concerns surrounding operating systems, databases, authentication and password policies, user administration, etc. Be sure to consider the audience of this presentation..
The molecular weight of vincristine a pharmaceutical drug : The molecular weight of vincristine, a pharmaceutical drug
Judicial review is concerned with decision making process : Judicial Review is concerned with the decision making process because it examines or focuses on how the decision was made, and therefore determines the legality of how the decision was reached or concluded. However, judicial review does review whethe..
Describe what happens to the direction of the vector : if you switch the sign of all the components of a vector (this called"parity reversal "),what happens to the length of the vector. what happens to the direction of the vector
Use a loop in main to efficiently handle all three persons : Plan and finish writing the main program, and all the functions, including a constructor. Use a loop in main to efficiently handle all three persons' data.
Compute poissons ratio for material at modulus of elasticity : A cylindrical specimen of some alloy 50.26 mm2 in cross sectional area is stressed elastically in tension. A force of 1620 N produces a reduction in specimen diameter of 5 X 10-3 mm. Compute Poisson's ratio for this material if its modulus of elas..
Determine what must be the allowable elongation : A cylindrical rod of brass alloy (E = 100 GPa,) having a yield strength of 345 MPa is to be subjected to a load of 7500 N. If the length and diameter of the rod are 338 mm and 7.55 mm respectively, what must be the allowable elongation
What the concentration in the effluent be 7 days later : A lagoon with volume 1,200 m3 has been receiving a steady flow of a conservative waste at a rate of 100 m3/day for a long enough time to assume that steady-state conditions apply. The waste entering the lagoon has a concentration of 10 mg/L.
Determine the percentage increase in the discharge the ditch : As part of a drainage improvement project, a drainage ditch will be straightened and cleaned. As a result, the lenght of the ditch will decrease from 1800 ft to 1400 ft and the mannings roughness factor will be reduced to 0.018 from 0.022.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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