write the 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.   Sample input (asking user to put input value): 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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

write the 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.

 

Sample input (asking user to put input value):

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 3 steps with 6 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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education