Array Assignments

Assignment #1 Two Dice(10 marks)

Modify the one dice roll simulator so that 1000 twodice rolls are simulated. Count the number of times each value (2-12) comes up. (7marks)
Add up the total of the dice throws (1 mark)
Find the average of the dice throws (1mark)
Modify the program so you can enter how many throws you want (1 mark)


Assignment #2 Golf Program(20 marks)

Create a computerized scorecard for a game of golf.

The program will need 4 arrays with 18 slots representing the scores of the 4 players

The program will need another array that holds the pars of the various holes

Since we don't want to type in the scores of the players each time we run the program, make a button called random game that generates the scores for the 4 players.

 

Sophistication

/10 marks for program that adds up the score totals for the 4 players (generated or typed in)

/4 displays birdies as blue, bogies as red, and pars as black.

/1(double bogies or eagles or extraordinary scores should be yellow)

/15 marks total

 

Artistic Impression

/5


Assignment #3 Marks Program (48 marks)

There is a new course at Wellington next year called Underwater Basketweaving. The principal of our school wants you to write a program that will keep the grades of 10 students and 10 marks. He would like totals and percentages for each student. Class averages for each test. A letter grade for each student would be nice also

He would like a clear button that resets all the textboxes

He would also like a random class button that generates a random class of marks.

You will need 14 arrays for the student names, 10 student marks, student totals, student percentages, and student letter grades.

I want the totals recalculated whenever a change is made in a textbox immediately

Since you don't want to type in the code in each textbox. Subroutines are a necessity but you don't necessarily pass parameters

Program Planning.....
Subroutines for........
1. Random class generation
2. Recalculating all the marks...this involves reading the marks out of the textboxes
and then recalculating the values and then displaying them to the proper textboxes.
3. Clear Subroutine that assignes 0 to all the values in the array and emptys all the textboxes.

 

Evaluation
/4 for Asthetics

/8 Program Complexity (1mark for each of the following)

Random Button generates students marks.
Calculation and Display of Student Totals
Calculation and Display of Student Percentages
Calculation and Display of Letter Grades
Calculation and Display of Test Averages
Editing of Marks (can change mark and have everything recalculate) (2marks)
Appropriate Use of Subroutines

/4 Commenting

The mark will be multiplies by 3.......
/48 marks total

Bonus Marks......... Find out how to do sorting from the teacher and create a button that allows you to sort the students highest to lowest score...... p.s. it must move their names and scores for each test.....