1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vredina [299]
2 years ago
11

Create a program that gets information from the owner and displays the current month’s expense for the employee’s wages. Require

ments: No loops or decision structures at this point Input comes from the keyboard when the owner enters the monthly data A month is 4 weeks Employees get paid once a month No taxes are taken out, currently it’s the employees job to do All of the input will be finished before the output begins The input: The owner should know which employee and week he is entering the information for Hourly:
Engineering
1 answer:
KatRina [158]2 years ago
8 0

Answer:

The code is in the explanation section below.

The sample output is

Espresso Yourself's Coffehouse

------------------------------

Enter details for Hourly employees:

Darren Duchesne:

Pay per hour: 6.45

Hours worked: Week 1: 35

Week 2: 35

Week 3: 35

Week 4: 35

Christian Cargile:

Pay per hour: 5.75

Hours worked: Week 1: 30

Week 2: 30

Week 3: 30

Week 4: 30

Selena Dresher:

Pay per hour: 6.25

Hours worked: Week 1: 30

Week 2: 30

Week 3: 30

Week 4: 30

Neil Palafox:

Pay per hour: 5.45

Hours worked: Week 1: 32

Week 2: 32

Week 3: 32

Week 4: 32

Salaried Employees:

Emilia Rogge:

Pay per annum: 32633

Weeks worked: 4

Jamie Lanphear:

Pay per annum: 27800

Weeks worked: 4

Explanation:

#include <bits/stdc++.h>

using namespace std;

struct employee{

string first_name, last_name;

int hours[4], weeks;

int total_hours;

double hour_pay;

double salary;

} emp[100];

int main()

{

emp[0].first_name = "Darren";

emp[0].last_name = "Duchesne";

emp[1].first_name = "Christian";

emp[1].last_name = "Cargile";

emp[2].first_name = "Selena";

emp[2].last_name = "Dresher";

emp[3].first_name = "Neil";

emp[3].last_name = "Palafox";

emp[4].first_name = "Emilia";

emp[4].last_name = "Rogge";

emp[5].first_name = "Jamie";

emp[5].last_name = "Lanphear";

cout<<"Espresso Yourself's Coffehouse\n";

cout<<"------------------------------\n";

cout<<"Enter details for Hourly employees: \n";

cout<<emp[0].first_name<<" "<<emp[0].last_name<<":\n";

cout<<"Pay per hour: ";

cin >> emp[0].hour_pay;

cout<<"Hours worked: ";

cout<<"Week 1: ";

cin >> emp[0].hours[0];

cout<<"Week 2: ";

cin >> emp[0].hours[1];

cout<<"Week 3: ";

cin >> emp[0].hours[2];

cout<<"Week 4: ";

cin >> emp[0].hours[3];

cout<<emp[1].first_name<<" "<<emp[1].last_name<<":\n";

cout<<"Pay per hour: ";

cin >> emp[1].hour_pay;

cout<<"Hours worked: ";

cout<<"Week 1: ";

cin >> emp[1].hours[0];

cout<<"Week 2: ";

cin >> emp[1].hours[1];

cout<<"Week 3: ";

cin >> emp[1].hours[2];

cout<<"Week 4: ";

cin >> emp[1].hours[3];

cout<<emp[2].first_name<<" "<<emp[2].last_name<<":\n";

cout<<"Pay per hour: ";

cin >> emp[2].hour_pay;

cout<<"Hours worked: ";

cout<<"Week 1: ";

cin >> emp[2].hours[0];

cout<<"Week 2: ";

cin >> emp[2].hours[1];

cout<<"Week 3: ";

cin >> emp[2].hours[2];

cout<<"Week 4: ";

cin >> emp[2].hours[3];

cout<<emp[3].first_name<<" "<<emp[3].last_name<<":\n";

cout<<"Pay per hour: ";

cin >> emp[3].hour_pay;

cout<<"Hours worked: ";

cout<<"Week 1: ";

cin >> emp[3].hours[0];

cout<<"Week 2: ";

cin >> emp[3].hours[1];

cout<<"Week 3: ";

cin >> emp[3].hours[2];

cout<<"Week 4: ";

cin >> emp[3].hours[3];

cout<<"Salaried Employees:\n";

cout<<emp[4].first_name<<" "<<emp[4].last_name<<":\n";

cout<<"Pay per annum: ";

cin >> emp[4].salary;

cout<<"Weeks worked: ";

cin >> emp[4].weeks;

cout<<emp[5].first_name<<" "<<emp[5].last_name<<":\n";

cout<<"Pay per annum: ";

cin >> emp[5].salary;

cout<<"Weeks worked: ";

cin >> emp[5].weeks;

 

emp[0].total_hours = emp[0].hours[0]+emp[0].hours[1]+emp[0].hours[2]+emp[0].hours[3];

emp[1].total_hours = emp[1].hours[0]+emp[1].hours[1]+emp[1].hours[2]+emp[1].hours[3];

emp[2].total_hours = emp[2].hours[0]+emp[2].hours[1]+emp[2].hours[2]+emp[2].hours[3];

emp[3].total_hours = emp[3].hours[0]+emp[3].hours[1]+emp[3].hours[2]+emp[3].hours[3];

 

cout<<"\n\n-----------------------------\n";

cout<<"Payroll for the month\n";

cout<<"Hourly Employees:\n";

cout<<"First Name Last Name\tHours Worked\tGross Pay\n";

cout<<emp[0].first_name<<" "<<emp[0].last_name<<"\t\t"<<emp[0].total_hours<<"\t"<<emp[0].hour_pay*emp[0].total_hours<<"\n";

cout<<emp[1].first_name<<" "<<emp[1].last_name<<"\t"<<emp[1].total_hours<<"\t"<<emp[1].hour_pay*emp[1].total_hours<<"\n";

cout<<emp[2].first_name<<" "<<emp[2].last_name<<"\t"<<emp[2].total_hours<<"\t"<<emp[2].hour_pay*emp[2].total_hours<<"\n";

cout<<emp[3].first_name<<" "<<emp[3].last_name<<"\t"<<emp[3].total_hours<<"\t"<<emp[3].hour_pay*emp[3].total_hours<<"\n";

cout<<"Salaried Employees:\n";

cout<<"First Name Last Name\tWeeks Worked\tGross Pay\n";

cout<<emp[4].first_name<<" "<<emp[4].last_name<<"\t"<<emp[4].weeks<<"\t"<<emp[4].weeks*emp[4].salary/48<<"\n";

cout<<emp[5].first_name<<" "<<emp[5].last_name<<"\t"<<emp[5].weeks<<"\t"<<emp[5].weeks*emp[5].salary/48<<"\n";

 

return 0;

}

You might be interested in
Which of the following is NOT true about hydraulic systems?
Dmitry [639]

Answer: The answer is D

D.In hydraulic systems, the operating temperatures must be kept between 170�F and 180°F 

Explanation:

The operating temperature for hydraulic systems is 140°F and below. Anything above this temperature is too high and will reduce the useful life of hydraulic fluid.

Most often problems associated with hydraulic systems are caused by fluid contaminated with particulate matter.

7 0
3 years ago
A rigid 14-L vessel initially contains a mixture of liquid water and vapor at 100°C with 12.3 percent quality. The mixture is th
tigry1 [53]

Answer:

Q = 65.388 KJ

Explanation:

To calculate the heat required for the given process Q, we recall the energy balance equation.

Therefore, : Q = Δ U = m (u₂ - u₁) ..................equation (1)

We should note that there are no kinetic or potential energy change so the heat input in the system is converted only to internal energy.

Therefore, we will start the equation with the mass of the water (m) using given the initial percentage quality as x₁ = 0.123 and initial temperature t₁ = 100⁰c , we can them determine the initial specific volume v₁ of the mixture. For the calculation, we will also need the specific volume of liquid vₙ  = 0.001043m³/kg and water vapour (vₐ) = 1.6720m³/kg

Therefore, u₁ = vₙ + x₁ . ( vₐ - vₙ)

                   u₁ = 0.001043m³/kg + 0.123 . ( 1.6720m³/kg - 0.001043m³/kg)

                   u₁ = 0.2066m³/kg

Moving forward, the mass of the vapor can then be calculated using the given volume of tank V = 14 L but before the calculation, we need to convert the volume to from liters to m³.

Therefore, V = 14L . 1m² / 1000L = 0.014 m³

Hence, m = V / u₁

                 0.014m³ / 0.2066 m³/kg

              m = 0. 0677 kg

Also, the initial specific internal energy u₁ can be calculated using the given the initial given quality of x₁ , the specific internal energy of liquid water vₐ = 419.06 kj / kg and the specific internal energy of evaporation vₐₙ = 2087.0 kj/kg.

Therefore, u₁ = vₐ + x₁ . vₐₙ

                   u₁ = 419.06 kj / kg + 0.123  .  2087.0 kj/kg

                    u₁ = 675.76 kj/kg

For the final specific internal energy u₂, we first need to calculate the final quality of the mixture x₂ . The tank is rigid meaning the volume does not change and it is also closed meaning the mass does not change.from this, we can conclude the the specific volume also does not change during the process u₁ = u₂. This allows us to use the given final temperature T₂ = 180⁰c to determine the final quality x₂ of the mixture. for the calculation, we will also need the specific volume of liquid vₙ=0.001091m³/kg and vapor vₐ =  0.39248m³/kg

Hence, x₂ = u₂ - vₙ / uₐ

x₂ = 0.2066 m³/kg - 0.001091m³/kg / 0.39248m³/kg

x₂ = 0.524

Moving forward to calculate the final internal energy u₂, we have :

u₂ = vₙ + x₂ . vₙₐ

u₂ = 631.66 kj/kg + 0.524  . 1927.4 kj/kg

u₂ = 1641.62 kj/kg

We now return to equation (1) to plug in the values generated thus far

Q = m (u₂ - u₁)

0. 0677 kg ( 1641.62 kj/kg - 675.76 kj/kg)

Q = 65.388KJ

7 0
3 years ago
Read 2 more answers
Yoda: sees corona<br> also yoda: wont last coronavirus will made in china it was!
zmey [24]

Answer:

yes!

Explanation:

7 0
3 years ago
Read 2 more answers
If you are exposed to potentially infectious material via a sharps injury, what should you do immediately?
Sergio039 [100]

The correct answer is "immediately flood the area with water and clean the wound."

Further Explanation:

If someone is exposed to a potentially infectious material with a sharps item such a needle, they need to wash the area with clean water immediately. It must be a steady flow of water to get out any potential infectious material.

After flushing the injury with water, you will then wash the area or exposed skin with soap, if at all possible use a disinfectant on the area.

The person who was injured should seek medical assistance for tests to be sure that they have not been affected.

Learn more about infectious material at  brainly.com/question/10928952

#LearnwithBrainly

4 0
2 years ago
Determine ten different beam loading values that will be used in lab to end load a cantilever beam using weights. Load values sh
nasty-shy [4]

Answer:

1st value = 1.828 * 10 ^9 gm/m^2 -------     10th value = 7.312 * 10^9 gm/m^2

Explanation:

initial load ( Wp) = 200 g

W1 ( value by which load values increase ) = 100 g

Ten different beam loading values :

Wp + w1 = 300g ----- p1

Wp + 2W1 = 400g ---- p2

Wp + 3W1 = 500g ----- p3 ----------------- Wp + 10W1 = 1200g ---- p10

x = 10.25" = 0.26 m

b = 1.0" = 0.0254 m

t = 0.125" = 3.175 * 10^-3 m

using the following value to determine the load values at different beam loading values

attached below is the remaining part fo the solution

5 0
2 years ago
Other questions:
  • Consider the following pulley system. A block of mass m is connected to a translational spring of stiffness k through a cable, w
    10·1 answer
  • For what two reasons do countries specialize? Countries specialize so that opportunity costs can be increased. Countries special
    13·1 answer
  • Steam at 20 bars is in the saturated vapor state (call this state 1) and contained in a pistoncylinderdevice with a volume of 0.
    10·1 answer
  • List three reasons for surfacing metals.
    8·2 answers
  • Heat is applied to a rigid tank containing water initially at 200C, with a quality of 0.25, until the pressure reaches 8 MPa. De
    8·1 answer
  • What should you consider when choosing the type of hearing protection you use?
    15·1 answer
  • Prelest! Introduction to Engineering and Technology 1 Select the correct answer. What technological invention allowed for the pr
    5·1 answer
  • How can you contribute to achieved the mission of NSTP during pandemic in your society?
    7·1 answer
  • 90% of traffic crashes are due to driver error.<br> True<br> False
    9·2 answers
  • Why do giant stars become planetary nebulas while supergiant stars become supernovas when their nuclear fusion slows and is over
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!