Question: Question 7: (a) Consider a graphic program that is bouncing balls on the screen. Balls are stored in memory. There is initially one ball and

Question 7: (a) Consider a graphic program that is bouncing balls on the screen. Balls are stored in memory. There is initially one ball and every second the program adds one ball for every ball already on the screen. Using O() notation, indicate how memory requirements grow over time. Justify your answer. (2 marks) (b) How long will it take to have a billion balls (!) bouncing on the screen? How much memory will it require, if each ball object uses 25 bytes? Comment on the results obtained e.g., how realistic is this scenario? (2 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
