Create a Program Considering 3 Stages

timer Asked: Mar 3rd, 2014

Question description

Type your programming question here.

1.  Write a program in the following stages:

a)  Step 1: Write code that will create a 640x480 picture, with every pixel set to the color (123,3,21). This picture should be stored in a variable called spam. Display the picture to the user.

b)  Step 2: Reassign spam to hold a picture the user selects. Update the output window so it displays this picture instead of the one from Step 1.

Step 3: Draw a circle and rectangle at random locations on the picture. By random I mean use randInt or randRange. Remember using random functions requires one extra step at the beginning of a program! Have the user choose a color for each of the shapes. Hint: addRect( picture, x, y, width, height, color) and addOval( picture, x, y, width, height, color ). Set the widths and heights for both to 50.

Tutor Answer

(Top Tutor) Studypool Tutor
School: UC Berkeley
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors