Difference between revisions of "CSC111 Homework 11"

From dftwiki3
Jump to: navigation, search
Line 11: Line 11:
  
 
</bluebox>
 
</bluebox>
 +
|}
  
 
==Bubbles, bubbles, bubbles==
 
==Bubbles, bubbles, bubbles==

Revision as of 07:40, 15 April 2010



This homework assignment is due next Thursday, at midnight. It deals with Object Oriented Programming, classes, and objects.

Bubbles, bubbles, bubbles

Write a program that is called hw11a.py, that is the continuation of Lab 11.

Your program should have a class for a fish, as you did in Lab 11.

In the new program you need implement a new type of object which represents bubbles. A bubble is an object for which you have to declare a new class.

As fish move around they generage generate bubbles through their mouth. In other words, bubble will appear randomly and when they do, their center should be the mouth of the fish. Then, as the simulation goes on, the fish moves slowly forward, and the bubble moves slowly up.