It is a single question with parts. Please consider this. C++ You are required to develop a complete C++ program to help small electric factory in managing the order and producing the product order report. Your program should produce the output as in the sample execution as shown in Figure 1, in which the values in bold are input by the user. You must read the instruction carefully whether the input entered should be in main function or in other function. Your program should have 5 functions as follows: Function 1: Write a function named readData.                                                           This is a non-returning function. It takes the number of regular order, new order and cancel order as input parameters. The function should ask the user to enter the number of regular order, new order and cancelled order. It sends all the values entered by the user in (c) back to the calling module through the use of reference parameters. Function 2: Write a function named printLevel                       This is a non-returning function. It takes the total orders per-product as an input parameter. The function should display the level of product order based on the conditions in Table 1. Table 1   Total orders (per-product) Level of product order above 100 Excellent 71 until 100 Good 41 until 70 Average others Low   Function 3: Write a function named compAvg.                         It takes the number of products and total of all products order as input parameters. The function should calculate the average of all products order. It should return the average value calculated in (b). Function 4: Write a function named printOutput.                                                This is a non-returning function. It takes the number of total orders per product. The function should display the number of total orders in (b) and product order level by calling the printLevel Function 5: Write a main function to perform the following tasks:                          You need to use an appropriate LOOP to perform the process in this function. The loop will be repeated when the user press ENTER. You are NOT ALLOWED to use arrays except an array of characters. The function should ask the user to enter a product name. The function may need to call the functions that are defined in Function 1, Function 3, and Function 4. The function should calculate the total order per-product using the following calculation: Total order = Regular orders + New orders - Cancel orders The function should determine the product with the highest total orders and calculate the number of products, and the total orders for all products. Note: You are NOT ALLOWED to use any predefined function(s) to determine which product get the highest total orders. The program should produce the output as in the sample execution given below. Note: The values in bold are input by the user. Others: List all function prototypes.                                                                                       You must ensure your program fulfil the following criteria:                                    The program is able to run. The program uses an appropriate structure for the program (e.g. all required header files are included, the program is properly written, proper indentation, etc.)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

It is a single question with parts. Please consider this. C++

You are required to develop a complete C++ program to help small electric factory in managing the order and producing the product order report.

Your program should produce the output as in the sample execution as shown in Figure 1, in which the values in bold are input by the user. You must read the instruction carefully whether the input entered should be in main function or in other function.

Your program should have 5 functions as follows:

Function 1: Write a function named readData.                                                          

  1. This is a non-returning function.
  2. It takes the number of regular order, new order and cancel order as input parameters.
  3. The function should ask the user to enter the number of regular order, new order and cancelled order.
  4. It sends all the values entered by the user in (c) back to the calling module through the use of reference parameters.

Function 2: Write a function named printLevel                      

  1. This is a non-returning function.
  2. It takes the total orders per-product as an input parameter.
  3. The function should display the level of product order based on the conditions in Table

1.

Table 1  

Total orders (per-product)

Level of product order

above 100

Excellent

71 until 100

Good

41 until 70

Average

others

Low

 

Function 3: Write a function named compAvg.                        

  1. It takes the number of products and total of all products order as input parameters.
  2. The function should calculate the average of all products order.
  3. It should return the average value calculated in (b).

Function 4: Write a function named printOutput.                                               

  1. This is a non-returning function.
  2. It takes the number of total orders per product.
  3. The function should display the number of total orders in (b) and product order level by calling the printLevel

Function 5: Write a main function to perform the following tasks:                         

  1. You need to use an appropriate LOOP to perform the process in this function. The loop will be repeated when the user press ENTER.
  2. You are NOT ALLOWED to use arrays except an array of characters.
  3. The function should ask the user to enter a product name.
  4. The function may need to call the functions that are defined in Function 1, Function 3, and Function 4.
  5. The function should calculate the total order per-product using the following calculation:

Total order = Regular orders + New orders - Cancel orders

  1. The function should determine the product with the highest total orders and calculate the number of products, and the total orders for all products. Note: You are NOT ALLOWED to use any predefined function(s) to determine which product get the highest total orders.
  2. The program should produce the output as in the sample execution given below.

Note: The values in bold are input by the user.

Others:

List all function prototypes.                                                                                      

You must ensure your program fulfil the following criteria:                                   

  1. The program is able to run.
  2. The program uses an appropriate structure for the program (e.g. all required header files are included, the program is properly written, proper indentation, etc.)

 

 

<<<<<<<<<<<<<< PRODUCT ORDER
>>>>>>
Product name : Vacuum
Regular order : 300
New order : 10
Total cancel : 200
<<<<<<<<<<<<< SUMMARY >>>>>>>>>>>
total order : 110
level : Excellent
Press <ENTER> to continue...
<<<<<<<<<<<<<< PRODUCT ORDER
>>
Product name : Rice Cooker
Regular order : 100
New order : 2
Total cancel : 70
<<<<<<<<<<<<« SUMMARY >>>>>>>
total order : 32
level : Low
Press <ENTER> to continue...
Transcribed Image Text:<<<<<<<<<<<<<< PRODUCT ORDER >>>>>> Product name : Vacuum Regular order : 300 New order : 10 Total cancel : 200 <<<<<<<<<<<<< SUMMARY >>>>>>>>>>> total order : 110 level : Excellent Press <ENTER> to continue... <<<<<<<<<<<<<< PRODUCT ORDER >> Product name : Rice Cooker Regular order : 100 New order : 2 Total cancel : 70 <<<<<<<<<<<<« SUMMARY >>>>>>> total order : 32 level : Low Press <ENTER> to continue...
<<<<<<<<<<<<<< PRODUCT ORDER
: Iron
Regular order : 90
New order : 5
Total cancel : 30
Product name
<<<<<<<<<<<<< SUMMARY >>>>>>>>>>>
total order : 65
level : Average
Press <ENTER> to continue...n
<<<<<<<<< ALL PRODUCTS ORDER >>>>>>>>>>
Total order (for all products) :
Highest: 110 (Vacuum)
Average for 3 products: 69
207
Figure 1
Transcribed Image Text:<<<<<<<<<<<<<< PRODUCT ORDER : Iron Regular order : 90 New order : 5 Total cancel : 30 Product name <<<<<<<<<<<<< SUMMARY >>>>>>>>>>> total order : 65 level : Average Press <ENTER> to continue...n <<<<<<<<< ALL PRODUCTS ORDER >>>>>>>>>> Total order (for all products) : Highest: 110 (Vacuum) Average for 3 products: 69 207 Figure 1
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY