Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question [65 Marks) Write a complete C++ program that helps the teacher to calculate the result of students in the test of Programming Technique. The
Question [65 Marks) Write a complete C++ program that helps the teacher to calculate the result of students in the test of Programming Technique. The program should perform the following tasks: Task 1: Write a function named getInput. (5.5 marks) a) This is a non-retuming function. b) It takes the score of question 1, score of question 2, and score of question 3 as input parameters. c) The function should ask the user to enter the score (per 100) for each question. d) It sends all the values entered by the user in (e) back to the calling module through the use of reference parameters. Task 2: Write a function named dispTier. (7.5 marks) a) This is a non-retuming function. b) It takes the total marks as an input parameter. c) The function should display the tier based on the conditions in Table 1. Table 1 Tier Tier 3 Tier 2 Tier 1 Total Marks Below 40% Below 75% 75% and above Task 3: Write a function named calcAverage. (4 marks) a) It takes the number of students and total marks as input parameters. b) The function should calculate the average marks per student. c) It should return the average marks calculated in (b). Task 4: Write a function named dispSummary. (4 marks) a) This is a non-retuming function. b) It takes the total marks as an input parameter. c) The function should display the total marks and tier by calling the dispTier function. Task 5: Write a main function to perform the following tasks: (33 marks) a) You need to use an appropriate LOOP to perform the process in this function The loop will be terminated when the user press ENTER or empty value for student's name. b) You are NOT ALLOWED to use arrays except an array of characters. c) The function should ask the user to enter a student's name. d) The function may need to call the functions that are defined in Task 1, Task 3, and Task 4. 2 2.25) + 100 100 Score for Question 3 100 e) The function should calculate the total marks using the following formula: Total Marks = (Score for Question 1 Score for Question 2 *+0) f) The function should determine the student with the highest and lowest total marks, and calculate the number of students, and the average marks per student Note: You are NOT ALLOWED to use any predefined function(s) to determine the highest and lowest total marks. g) The program should produce the output as in the sample execution given below. Note: The values in bold are input by the user. Task 6: List all function prototypes. (4 marks) Task 7: You must ensure your program fulfill the following criteria: (7 marks) a) The program is able to run. b) The program uses an appropriate structure for the program (eg. all required header files are included, the program is properly written, proper indentation, etc.) SAMPLE PROGRAM EXECUTION > Name Rashid Hamid Q1 mark: 41 Q2 mark: 42 03 mark: 35 >> Total marks: 38 Tier Tier 3 >>> Total marks: 67 Tier : Tier 2 >>> Name : Lim Chong Kit Q1 mark: 75 Q2 mark: 72 Q3 mark: 80 >> Total marks: 76 Tier : Tier 1 3 >>>>>>>>>>>>> Name : Sivakumar Ramasamy 01 mark: 65 02 mark: 72 Q3 mark: 55 >>> Total marks: 62 Tier : Tier 2 >>> Name : >> Lowest mark : 38 (Rashid Hamid) Highest mark: 76 (Lim Chong Kit) Average for 4 students: 60
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started