Answered step by step
Verified Expert Solution
Question
1 Approved Answer
It's 2 parts but only posting them together due to the fact they're related. This is done in Processing, java. MECH 3032 Processing Pre-Lab: Conditionals
It's 2 parts but only posting them together due to the fact they're related. This is done in Processing, java.
MECH 3032 Processing Pre-Lab: Conditionals Points Possible: 20 Submission Instructions: Your homework will be submitted electronically to Canvas. The file format must be a processing.zip file. Your file should be named mech_3032_your_name.pde. Substitute your first and last name for "your_name" in the file name. Example: Students name is Sparky Watts. The file name is mech_3032_sparky_watts.zip. The zip file should contain both your programs. The program must include the following information in comments: (1) program description, (2) course information, (3) assignment, (4) date, and (5) student name. 1. Write a program that draws shapes and determines their colors, based on random numbers. Generate random values in the range (1,3). Clear the background each time through the draw function. You may use the default fill and stroke colors or specify your own. Display the random number in the console. Use the framerate function to slow the program. Use a framerate of 5 frames per second or less. Random Value 1 Shape Ellipse Size % window width, % window height % window width, window height 2 Location Centered in window Centered in window From upper left corner to lower right corner Rectangle 3. Line 2. Write a program like part 1. Draw a window that is 640 pixels wide by 480 pixels high. When the left mouse button is pressed, generate a random value in the range (1,3). Random Value 1 Shape Ellipse Size % window width, window height % window width, % window height 2 Rectangle Location Centered at mouse location Centered at mouse location From previous mouse cursor position to current mouse cursor position Line 3 Display a message in the console when a mouse button is pressed. Display the mouse cursor position in the window's titleStep 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