write a program in c++ Assume eight employees working at Ziomind Sdn Bhd (Ismail, Atikah, Ravi, Sumaia, Jonathan, Halimah, Salleh, and Khadijah). The working hours are flexible and every employee might work as low as 1 hour or as much as 9 hours per day for 7 days per week.   The company would like to prepare a report that displays the number of working hours for each employee per day, the total working hours per week, and the highest working hours in the week achieved by each employee.   Write a program that reads the data recorded by the eight employees that contain the following:   A one-dimensional array to store the names of the eight employees and a two-dimensional array of eight rows and seven columns of type double to store the seven-day work hours for each employee. A function named read_data() to read data from the user and display the employee’s names and the seven-day work hours. The employee’s name should be stored in the one-dimensional array of type string. A function to calculate and display the total working hours for each employee per week and the highest working hours in the week by each employee.   The data is given to you as shown below. The data is read in sequence as follows; the first input is the name of the employee, the subsequent input represents the working hours' values each day per week. the sample input is asked to a user to put a value in input using cin  Sample input: Ismail  2 4 3 4 5 8 8 Atikah 7 3 4 3 3 4 4 Ravi 3 3 4 3 3 2 2 Sumaia  9 3 4 7 3 4 1 Jonathan  3 5 4 3 6 3 8 Halimah   3 4 4 6 3 4 4 Salleh  3 7 4 8 3 8 4 Khadijah  6 3 5 9 2 7 9 Sample output:   Name Sun Mon Tue Wed Th    Fri Sat   Ismail 2 4 3 4      5 8 8 Atikah 7 3 4 3 3 4 4 Ravi 3 3 4 3 3 2 2 Sumaia 9 3 4 7 3 4 1 Jonathan 3 5 4 3 6 3 8 Halimah     3 4 4 6 3 4 4 Salleh 3 7 4 8 3 8 4 Khadijah 6 3 5 9 2 7 9     Name Total hours Highest Working Hours       Ismail 34              8   Atikah 28              7   Ravi 62              4   Sumaia 31              9   Jonathan 32              8   Halimah     63              6   Salleh 37              8   Khadijah 41              9

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 4PE
icon
Related questions
Question
100%

 

write a program in c++

Assume eight employees working at Ziomind Sdn Bhd (Ismail, Atikah, Ravi, Sumaia, Jonathan, Halimah, Salleh, and Khadijah). The working hours are flexible and every employee might work as low as 1 hour or as much as 9 hours per day for 7 days per week.

 

The company would like to prepare a report that displays the number of working hours for each employee per day, the total working hours per week, and the highest working hours in the week achieved by each employee.

 

Write a program that reads the data recorded by the eight employees that contain the following:

 

  1. one-dimensional array to store the names of the eight employees and a two-dimensional array of eight rows and seven columns of type double to store the seven-day work hours for each employee.
  2. A function named read_data() to read data from the user and display the employee’s names and the seven-day work hours. The employee’s name should be stored in the one-dimensional array of type string.
  3. A function to calculate and display the total working hours for each employee per week and the highest working hours in the week by each employee.

 

The data is given to you as shown below. The data is read in sequence as follows; the first input is the name of the employee, the subsequent input represents the working hours' values each day per week.

the sample input is asked to a user to put a value in input using cin 

Sample input:

Ismail  2 4 3 4 5 8 8

Atikah 7 3 4 3 3 4 4

Ravi 3 3 4 3 3 2 2

Sumaia  9 3 4 7 3 4 1

Jonathan  3 5 4 3 6 3 8

Halimah   3 4 4 6 3 4 4

Salleh  3 7 4 8 3 8 4

Khadijah  6 3 5 9 2 7 9

Sample output:

 

Name

Sun

Mon

Tue

Wed

Th   

Fri

Sat

 

Ismail

2

4

3

4     

5

8

8

Atikah

7

3

4

3

3

4

4

Ravi

3

3

4

3

3

2

2

Sumaia

9

3

4

7

3

4

1

Jonathan

3

5

4

3

6

3

8

Halimah    

3

4

4

6

3

4

4

Salleh

3

7

4

8

3

8

4

Khadijah

6

3

5

9

2

7

9

 

 

Name

Total hours

Highest Working Hours

 

 

 

Ismail

34

             8

 

Atikah

28

             7

 

Ravi

62

             4

 

Sumaia

31

             9

 

Jonathan

32

             8

 

Halimah    

63

             6

 

Salleh

37

             8

 

Khadijah

41

             9

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Algebraic Expressions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,