A computer game is designed for users to select characters. Each character can take part in a group of events. Each group has five events. There are four types of event: jump, swim, run, drive. The program is written using object-oriented programming. Two characters are attempting each event in the group you created in part 1(b). One character has the name Tarz and the skill levels: Jump 5 Swim 3 Run 5 Drive 1 The second character has the name Geni and the skill levels: Jump 2 Swim 2 Run 3 Drive 4 Each Character object is stored in a variable. (i) Amend the main program to declare and create an instance of a Character object for Tarz and for Geni. Save your program. Copy and paste the program code into part $$\(\mathbf{1 ( e ) ( i )}\)$$ in the evidence document. (ii) Both characters Tarz and Geni take part in each event in the group you created in part 1(b). These steps are repeated for all five events: - The percentage chance of each character completing the event is calculated and compared. - The character with the highest percentage chance of completing the event gets 1 point. Their character name is output together with a message telling them they have won that event. - If both characters have the same percentage chance of completing the event, the scores do not change, and a message is output stating that the event is a draw. When the total score for each character has been calculated, the name of the character with the highest score is output stating they have won and the number of points they have. If both characters have the same number of points, a message is output telling them the group is a draw. Amend the main program to: - calculate the score for each character in each event - output the name of the character that wins each event or that the event is a draw - output the name of the character that has the most points for the group or that the group is a draw. Save your program. Copy and paste the program code into part 1(e)(ii) in the evidence document. (iii) Test your program. Take a screenshot of the output. Save your program. Copy and paste the screenshot into part 1(e)(iii) in the evidence document.

Computer Science
IGCSE&ALevel
CAIE
Exam No:9618_w24_qp_42 Year:2024 Question No:1(e)

Answer:











Knowledge points:

19.1 Algorithms
20.1 Programming Paradigms

Solution:

Download APP for more features
1. Tons of answers.
2. Smarter Al tools enhance your learning journey.
IOS
Download
Android
Download
Google Play
Download