Skip to content

Latest commit

 

History

History
71 lines (43 loc) · 3.38 KB

oop_design_challenge.md

File metadata and controls

71 lines (43 loc) · 3.38 KB

OOP Design Challenge

Description

In this assignment we will apply everything we have learned to design classes and objects that could be used to build a a game, application, or other system! You can use any idea you like as long as it fulfills the rubric.

Note: The goal of this project is to design classes and instantiate example objects that would be used in your game or app. It is not to design an entire working game or app, if you would like to do this as a stretch goal feel free, but it is not required.

Set Up:

🚨 Before starting the assignment, watch How to: Setup for a New Assignment.

This tutorial walks your through how to set up a new repository, make commits, and push code to Github.

Requirements

Submission Requirements:

  1. Your submitted code should be in a new (public) repo on Github.
  2. Your repositroy should include a README with the name of your project and a description.
  3. Submit the link to your repo and diagram on Gradescope.

Assignment Requirements:

For this assignment you will need to complete the following requirements:

Classes:

  • At least 4 classes are defined.
  • At least 1 class demonstrates composition (being composed of other objects).
  • At least 1 class inherits from another class.
  • All classes are used to instantiate example objects.

Methods:

  • Each class has at least 2 methods that use and/or modify class attributes.
  • The subclass overrides at least one superclass method (this can be init or another method).
  • Rationale about which methods are private, protected, or public should be provided in code comments or verbally during presentation.

Attributes:

  • Each class has a least 2 instance attributes created in init()
  • Rationale about which attributes are private, protected, or public should be provided in code comments or verbally during presentation.

Diagram:

  • A diagram is provided that shows an overview of all the classes that make up the system design
  • Diagram shows relationships between classes.
  • You can achieve this by creating UML Class Diagrams. Here is a template on how to make them, here.

Presentation:

  • 5 - 10 min in-class presentation is given showing off all of the above requirements.
  • Note: If you cannot make the presentation day, you may turn in a video presentation beforehand to instructor via Slack.

Example Idea

You are creating a fruit catch game similar to the one shown here

You game will need to have multiple fruits each with different falling speeds, images, and point values. There will also be a special power up fruit that lets the basket move faster for a limited duration of time. In addition to the fruits occasionally a rotten fruit will fall that if caught will subtract points rather than add them. You will also need to have a basket that can move and catch fruits. You will need to have some sort of game controller that makes fruits and keeps track of the time and score. The game ends when the timer is up.

Stretch Challenges

  • Demonstrate Overloading
  • Demonstrate Abstract Classes
  • Demonstrate Static Methods
  • Demonstrate Decorators
  • Demonstrate Multiple Inheritance
  • Demonstrate Mix In's