Click here for college alerts
regarding the Wuhan Virus.
CST 112.
Introduction to
Computer Programming

Check this "CST 112 NEWS" page, regularly,
for further instructions.

Click here for the "letter"
that was previously posted
on this page.
NOTICE:
Priority Registration
has been moved back by one week:
  • New dates are: Monday, April 13 - Monday, April 20.
  • Registration for new students will begin on April 21.

At this point, you should be creating object class definitions and working on code for Project #2 (which was assigned before the break).

Don't bother fixing or making improvements to Project #1 (nor to your q1/r1/s1 code); instead, work on Project #2, to get acquainted with Object-Oriented software design. (If your p2 code fixes something that was broken in your p1 code, it will count for both!)

Don't try to do all of Project #2 at once!

    "WhiteBoard"    
 
Instead, just build one or two object classes, get them to work, add some more, and fulfill the Project #2 requirements step-by-step, running and perfecting each small change as you go.

When you have completed a new piece of code to show off -- or if you need help -- call me for a "Code Review" session!

Project #2:
Do not copy your p1 code.
Instead, use it as a guide to write new object-based code.

    Start with object class definitons such as:
  • a "Hero" class
  • a "Dog" class
  • a "Monster" class
  • a "House" class
  • a "Tree" class
        // You may use different names for these classes.
Each class has properties for that object (to remove globals!), and each class does methods such as:
  • void show()         // display the object.
  • void move()         // move this object independently,
        // OR //
    void chase( float x2, float y2 )   // make it chase coordinates (x2,y2)

  • boolean near( float x2, float y2 ) // return true iff it is near (x2,y2)
  • void reset()
  •     // plus any other necessary methods (or constructors)

Then, write new object-based code to use these classes.

Click here for Project #2: specifications

Also, see the examples at compare.html and dc_chase.pde


Previous announcements:

STUDY the OO example at compare.html

  Please have a preliminary version of your code for Project #2
  available in your folder during the week of March 23rd,
  and be prepared to present your p2 code during "Code Review".
 



.. (Class Page)

.. (Class Page)


Z/files/
Click for access to files.