Coding Assignment 2
Coding Assignment 2
Learning goal
Combine your understanding of nested loops, 1D and 2D arrays, and reading data from files
and uses the data in the file to draw a grid of balls like this:
The grid should be drawn such that:
1. Each row has the given number of balls specified in the first line of the data file.
The color of each row is specified by the RGB values in that row's line of the data file.
2. The vertical gap between a row and the row above it is given by the last number in that row's
line of the data file. For the first row, the vertical gap is the distance from the top edge of the
screen.
3. Every ball in every row (except the bottom) is connected by a line to every ball in the row
below it.
4. The user can drag a whole row of balls around the screen by clicking on any ball in that row
and dragging with the mouse. All lines connected to balls in that row follow accordingly. Watch
this video to see an example of a correct program in action.
Marking
Instead of submitting your program on Classroom, your team will show me your working program at
each feature that you successfully code.
Teamwork
At the end of the project, I'll ask you and your teammate to estimate the percentage of the work each
of you thinks you contributed to the final program. Example: Safwan 45%, Miranda 55%.
If you and your teammate agree you each did 50%, you each get the same mark.
If you both agree that the split of the work was not 50%, I'll adjust the marks accordingly.
Regardless of how you shared the work, both teammates should be able to explain every line of your
program to me.