CST112 Project 10: Chapter 9
-
Design some object of your own (this should be a different object than the ones you created
for any previous project). This is an "open-ended" application that must be completed
using classes, objects and arrays; your figure may bounce off the
output window walls, jump up and down, or whatever else you choose; additionally you could
manipulate other properties of your animated figure and/or the output window environment
-
The primary requirement of this project, no matter which version of the assignment you choose to complete,
is that you define a
class
with a "list" of attributes that are initialized in the constructor
method and manipulate the attributes of the class within a display()
method as well as one other method that implements the class "animation"; instantiate an
array of multiple objects from the class in the "driver" application,
and use for loops in setup()
to instantiate
the objects and draw()
to iterate through the objects' methods
-
The class should be created using the "New Tab" command and saved as a separate file
-
The size of the output window should be at least 400 by 500 pixels, but in any case the
width
and the height
should be different
-
Include a separate drawBackground
()
method in the "driver" file that
draws the background for the sketch which could include a background()
function call
but should additionally implement coding that creates a background (no PImage
objects)
-
The difference between full credita grade of 10 out of ten points or
lesson this assignment partially is contingent on the complexity of the design,
so be as creative as you can, not only with the class design, but also with the design of the
drawBackground
()
function
-
Credit for this assignment is as follows:
-
Complete the assignment as specified above for a maximum of eight (8)
points
:
-
Click this Play Project 10
link to view a sample application which demonstrates the functionality that should
be built into your sketch
-
In this example there are twenty (20) 'Smiley Face' objects there that simply
are bouncing of the walls; however this is just an example since your assignment
is to create something completely different
-
Optional element No. 1 for one (1) additional point
of credit
:
-
Provide some interaction between the
mousePressed
boolean system
variable and array objects as we did in "MiniQuiz No. 1" (e.g. clicking on an
object to make something happen; this is not the same
thing as adding or removing array objects during the mousePressed()
function)
-
Click this Play Project 10 Option 1
link to view a sample application which demonstrates the optional functionality
that might be built into your sketch (the 'Smiley Face' eyes disappear when each
object is clicked using the
dist
function; however this is just an
example since you can create something similar or completely different)
-
Optional element No. 2 for one (1) additional point
of credit
:
-
Use one or more of the array functions to add, insert
and/or remove objects from the animation while it is playing as we did in "MiniQuiz No. 2"
-
Click this Play Project 10 Option 2
link to view a sample application which demonstrates the optional functionality
that might be built into your sketch (in a
keyPressed()
function,
new 'Smiley Face' objects are appended to the array when the <UP
>
arrow key is clicked and objects are removed from the array when the <DOWN
>
arrow key is clicked; however this is just an example since you can create something
similar or completely different)
-
Complete the assignment with both "optional elements"
above for full credit, a maximum grade of ten (10)
points
-
Insert comments at the beginning of both program
files for the assignment project number, your name and e-mail address, the date
of submission, and a brief description of what the program does; additionally
comment each of the sections of code, including a comment at the beginning
of each of the programmer-defined functions and methods
-
Students may work on all projects in teams of two or three,
and, if so, all students in the group must submit the same project to their own dropboxes
in Blackboard. In the text box's dropbox, as well as in the source code documentation
(comments), state the name(s) of the classmate(s) with whom you worked.
-
The completed project archived into a ".ZIP" file submitted
electronically via an attachment to a
Brightspace
dropbox is due to Prof. Struck no later than 11:59 p.m. on the date
listed in the course outline.