Starting from:

$15

ISM 3255 Assignment 3  Solution

Following ASG02, continue to do these tasks:
Preparation
1- Compare your answer with the sample answer and make sure you understand every line of the code.
2- See if you can make the sample answer shorter (e.g. by removing the curly brackets
Main Task
Modify your answer to ASG02 as follows.
1- Start by removing the 4 “hard coded” students’ answers and the key answer
2- Ask the user to enter (ReadLine) the key answer in the following format:
“XXXXXXXXXX” followed by Enter (notice the input is 10 characters long
3- Ask the number of the students (n) from the user
4- Based on n, your code asks for n students answers each in the following format
“YYYYYYYYYY” followed by Enter (notice the input is 10 characters long
5- After receiving all n answers, print a similar table as ASG02 (note that the student#s (student numbers) are calculated by your code and displayed.


6- Compute and display the average score for all students.

Challenge
Write part 6 using a function (method). The function input is the arrays of scores and the output is the average of the scores.

More products