2. Watson Elementary School contains 30 classrooms numbered 1 through 30. Each c
ID: 3634991 • Letter: 2
Question
2. Watson Elementary School contains 30 classrooms numbered 1 through 30. Each classroom can contain any number of students up to 35. Each student takes an achievement test at the end of the school year and receives a score from 0 through 100. Write a program that accepts data for each student in the school—student ID, classroom number, and score on the achievement test.Calculate an average for each classroom.
At the beginning of the program allow the user to enter the total number of classrooms. (So that you can test with only 3 or 4 classrooms)
For each Classroom allow the user to enter the total number of students for that class. (Again, so you can test with only 3 or 4 students in each classroom)
Design a program that allows input for each student in each classroom (Student ID, Classroom Number and Score)
Calculate an average score for each classroom.
Then list the total points scored for each of the 30 classrooms and list the average score for each classroom
Include a function/subroutine that ensures that the user enters classroom number within the range you want.
Include a function or subroutine that allows the user to enter the student ID, Classroom Number, and score.
Create an array that holds all the data
Then display all the data from the array.
Hint: add an extra column to the array to hold the average for that classroom.
Submit the .bas module OR a word document with a copy of the code.
Explanation / Answer
Dear, Giving you pseudocode: start Declarations num classrooms[30] num count num totalstudents num test_score[100] num student_ID[SIZE] num classroom_number num total num j housekeeping() display() stop housekeeping() for count = 0 to 30 step 1 output “Enter Room number” input classroom_number[count] output “Enter total students in the room” input totalstudents for j = 0 to totalstudents step 1 output “Enter Student ID” input studentID[j] output “Enter Student Score” input test_score total += test_score; endfor endfor return display() output ”The class room number is” , classroom_number[count] output ”The total points scored by the class is ”, total return Hope this will help you..
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.