Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started