Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please show work. Lab 4.3 Bubbles M1111 Bubbles Name The screen begins with any number of bubbles of different sizes floating on it. These bubbles

image text in transcribed

image text in transcribed

Please show work.

Lab 4.3 Bubbles M1111 Bubbles Name The screen begins with any number of bubbles of different sizes floating on it. These bubbles move around the screen. When they hit the sides of the screen or other bubbles they rebound and travel in another direction. Players position the mouse pointer where they would like to grow a new bubble. They click and hold down the mouse button. A bubble begins to grow with the center located at the coordinates of the mouse pointer. When the player releases the mouse button then the bubble is done growing and floats away bouncing into other bubbles. If any bubbles hit the player's growing bubble before the mouse button is released, then the bubble bursts and the game is over. If the player's growing bubble touches the sides of the screen before the mouse button is released, then the bubble bursts and the game is over. The goal is to fill the screen with bubbles covering a percentage of the screen given at the beginning of the game level and posted at the top of the screen. Our game here is not that complex. The bubbles are not moving. The goal here is simply to determine the largest bubble that could be formed at the mouse pointer position and draw it. The bubbles currently on the screen are cataloged in the Circles array. The mouse pointer is already positioned on the screen. The coordinates are collected by the function call: M = getMouseCoordinates(). The circle is determined and drawn by the function call: N = drawBubble(MCO), M[1]). You are to TRACE through the flowchart for drawBubble. Record any and all alterations to the variables, including M and N. Perform any further function calls. 3) Circles = [[ 6, 6, 41, [8, 14, 21, [13, 11, 1],[15, 5, 3 ]] M = getMouseCoordinates() N = drawBubble (M[O], M[1]) drawBubble(x,ye) LlengthCircles 43% D-VIC-Circle (300 tyc. CircleCor Circle DER RED + r .Cirche, ys, pultles, [ ac, ye, Lab 4.3 Bubbles M1111 Bubbles Name The screen begins with any number of bubbles of different sizes floating on it. These bubbles move around the screen. When they hit the sides of the screen or other bubbles they rebound and travel in another direction. Players position the mouse pointer where they would like to grow a new bubble. They click and hold down the mouse button. A bubble begins to grow with the center located at the coordinates of the mouse pointer. When the player releases the mouse button then the bubble is done growing and floats away bouncing into other bubbles. If any bubbles hit the player's growing bubble before the mouse button is released, then the bubble bursts and the game is over. If the player's growing bubble touches the sides of the screen before the mouse button is released, then the bubble bursts and the game is over. The goal is to fill the screen with bubbles covering a percentage of the screen given at the beginning of the game level and posted at the top of the screen. Our game here is not that complex. The bubbles are not moving. The goal here is simply to determine the largest bubble that could be formed at the mouse pointer position and draw it. The bubbles currently on the screen are cataloged in the Circles array. The mouse pointer is already positioned on the screen. The coordinates are collected by the function call: M = getMouseCoordinates(). The circle is determined and drawn by the function call: N = drawBubble(MCO), M[1]). You are to TRACE through the flowchart for drawBubble. Record any and all alterations to the variables, including M and N. Perform any further function calls. 3) Circles = [[ 6, 6, 41, [8, 14, 21, [13, 11, 1],[15, 5, 3 ]] M = getMouseCoordinates() N = drawBubble (M[O], M[1]) drawBubble(x,ye) LlengthCircles 43% D-VIC-Circle (300 tyc. CircleCor Circle DER RED + r .Cirche, ys, pultles, [ ac, ye

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Shouhong Wang, Hai Wang

1st Edition

1612330150, 978-1612330150

More Books

Students also viewed these Databases questions

Question

Identify cultural barriers to communication.

Answered: 1 week ago