Note: You should complete this assignment in identified pairs (not more than two students). You should submit your assignments separately, but you will receive the same grade as your partner. You may do this assignment by yourself, if you are so inclined…but then you cannot discuss the homework with any other students (or reference any other students in your header).
For this homework assignment, you’ll build on what you learned in lab. Do not start this homework until you have completed the graphics lab. You may start this assignment using your completed lab file.
In this assignment, you will build an aquarium visualization. From lab, we assume that you already have two different kinds of fish that can swim accross the screen.
Required Features:
- Modify the
.move()
method in the Fish
class to get your fish to bob up and down instead of swimming in a straight line.
- Augment your
Fish
class so that you can make fish facing either LEFT and RIGHT (you may want to add a direction
input to the __init__
method).
- Make your fish turn around (flip) when it hits the edge of the screen and start swimming the other direction.
- Add a third kind of fish that behaves and looks different from the first two. Perhaps it only swims in the bottom or top half of the tank, or it primarily swims from top to bottom.
- Use multiple classes to store your visual objects and use inheritance to have special kinds of fish and basic fish.
- Safely exit the aquarium when user is done (either keyboard click or mouse click, your choice).
- Add one or more of the optional extra features (below).
Now it’s your chance to be creative! There are lots of modifications you could make to your tank.
Optional Extra Features:
- Add some decorations (a castle, some plants, etc.). Plants that sway in the background?
- Add small bubbles, floating from the bottom of the screen to the top.
- Add Sharks that eat the fish.
- Add a background, such as the one provided here.
- Make it so that when the user clicks the screen or on a keyboard shortcut a new fish is added. You could use different letters to add each kind of fish.
- Create your own optional extra feature.
Complete a personal reflection in a file called hmwk9-readMe.txt
. In the first part list all features you implemented (including anything you believe you should receive partial or full credit for). In the second part, reflect on any challenges you had in completing this assignment (both technical and life), including any features you tried to complete but abandoned. (Note: there is no google form for self-reflection this week.)
Grading criteria (12 points):
Style points (4 points):
The submission:
- includes the complete course header
- uses appropriate, informative variable names
- has inline comments, and descriptions of each function and class
- includes all files required to run your assignment
- the main() should be located in a files called
hmwk9.py
- runs without syntax errors
- includes a
hmwk9-readMe.txt
file giving your reflection and self evaluation on this assignment
Operations (8 points):
The program includes each of the required features and one optional feature. Programs will be evaluated based on code quality and the quality of the visualization.
Submissions
Your submission must include the course header at the top.
Last Submission April 28, 2020 at 10:00PM (EST). Go to our Moodle page. Submit your hmwk9.py
, hmwk9-readMe.txt
, and any other files needed to run your program.