CST 112 2019 Fall
Exam #2 (Q2 & R2)

Follow the instructions below to write your own (Processing) Java code for both exams:

Instructions:

Write Java code to define these object classes: Button, Monster, Witch, Animal, Tree .
You may use (and modify) code from the "template code"

Each instance of these objects must have a (global) name that follows the rules, below.
All object properties must be defined within the object class, and global variables must not be used for the properties of any of these objects.

Animation:

Witch, Monster, and Animal should all display some sort of animation, as they move. (Animation may be added for candy treat, but none is needed for moon or trees.

Buttons:

The four buttons should have the following labels and perform the actions described below:

Names of objects.

When you declare a global variable as an instance of a class,
the name depends on your own name, following these rules:

Monster instance name begins with:   first letter of your Firstname (in lower case)
Witch instance name begins with:   first letter of your Lastname (in lower case)
Animal: instance name begins with:   last letter of your Lastname
Tree: instance names begin with:   fourth letter of your Lastname

For example, if your name is:     Firstname   Lastname   ,
then your declarations might look something like these:
	Monster frank;
	Witch   linda;
	Animal  elmer = new Animal();
	Tree   t1, t2, t3, t4, t5;


Available Resources

This exam (and all computer programming exams) will be "open book"
This "template code"
(and this "starter code")
which you may modify or use in your own code.

This "sample code" contains a solution, which you may study; however, none of this sample code may be submitted as part of your own code.