CST 112.
Introduction to
Computer Programming

"Spring Break" extended until March 29th
due to the Wuhan virus,

Click here for the official alerts.

No classes:   March 16-29th  


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

  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".
 

"WhiteBoard"
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( x2, y2 )   // make it chase coordinates (x2,y2)

  • void reset()           // reset this object.
  • boolean near( x2, y2 ) // return true iff it is near (x2,y2)
  •     // 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 example at compare.html


Previous announcements:



.. (Class Page)