Starting from:

$25

CSC35- Lab 2: Points to Ravenclaw Solved

Overview 
 Student wizards and witches are taught at the famous Hogwarts School of Witchcraft and Wizardry. This noble school has produced some of the finest magical students the World has ever seen.  


During the school year – full of potions, spells, Quidditch, and various students being maimed – each House is awarded points by the faculty. At the end of the term, the House with the most points wins the prestigious House Cup!  


These points can be earned by academics, winning contests, bravery, etc... The points can also be lost by breaking rules, poor academics, etc…
 

You are going to use the odd Muggle technology called "computers" to create a simple program to keep track of points. You will input the number of students that have earned/loss points in different categories. At the end, display how many points were earned.

Sample Run 
The following is a sample run of the program. The user's input is printed in blue. The data outputted from your calculations is printed in red.  
                                2

Requirements 
You must think of a solution on your own.  The requirements are as follows:

 

1.   Come up with 3 of your categories. Don't use mine.

2.   Display a table to the screen. Please see above.

3.   Display a prompt, to the user, for each student count.

4.   Input the number of students for each category.

5.   Calculate the total number of points. Tip: use a register to create a running total.

6.   Output the total number of points with some helpful text.

Hints 
•       Start off by getting the first multiplication to work and print the correct value.

 

•       Now work on each of the requirements below one at a time. You will turn in the final program, but incremental design is best for labs.

More products