Difference between revisions of "CSC111 Homework 11"
(Created page with '{| | width = "40%" | __TOC__ | <bluebox> <br /> <br /> This homework assignment is due next Thursday, at midnight. It deals with Object Oriented Programming, classes, and object…') |
|||
Line 11: | Line 11: | ||
</bluebox> | </bluebox> | ||
+ | |||
+ | ==Bubbles, bubbles, bubbles== | ||
+ | |||
+ | Write a program that is called hw11a.py, that is the continuation of [[CSC111 Lab 11|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. |
Revision as of 07:40, 15 April 2010
Contents |
Bubbles, bubbles, bubblesWrite 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. |