Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

answer in processing It's late, and Cookie Monster is hungry. He's going to sneak downstairs to get a cookie from the cookie jar. But the

answer in processing image text in transcribed
It's late, and Cookie Monster is hungry. He's going to sneak downstairs to get a cookie from the cookie jar. But the lights are off and it's dark! He will have to fumble for the lightswitch to brighten up the room. For this question, you will write a program that will simulate how bright the room is as the lights are turned on or off. Here is a description of how your program should behave Use a canvas of any reasonable size. Across the top of the canvas are 3 stationary lightbulbs (circles). If a lightbulb is currently turned on, it should be colored yellow. If it's currently turned off, it should be colored black when your program first starts, have 1 bulb on and the other 2 off When the user clicks a lightbulb Turn that lightbulb on Gif it was off) or off of it was on) The background color should depend on how many lightbulbs are currently turned on. If all of them are on it should be white. If all of them are off, it should be black. If one of them is on, it should be dark grey. If two of them are on it should be light grey I Figure 2. The canvas getting lighter as more lightbulbs are turned on Note that when all the lightbulbs are off, the entire canvas is black (black circles on a black background). so clicking on a lightbulb is slightly tricky. This is intentionally a little bit like fumbling around in the dark to turn on a light-switch when you can't see anything

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

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions

Question

=+8. Why is productivity important?

Answered: 1 week ago

Question

=+ 9. What is inflation and what causes it?

Answered: 1 week ago