ISF DP Computer Science

OOP Practice #

In this lab you will choose a real world system to model using OOP.


[0] Set up #

๐Ÿ’ป Clone your repo in the correct folder. Be sure to replace yourgithubusername with your actual username.

cd ~/desktop/dpcs/unit03_oop
git clone https://github.com/isf-dp-cs/lab_oop_practice_yourgithubusername
๐Ÿ’ป In the Terminal, type the following command to open the lab folder.
cd lab_oop_practice_yourgithubusername

๐Ÿ’ป Enter the Poetry Shell to start the lab. As a reminder, we will run this command at the start of each lab, but only when we are inside a lab folder.

poetry shell
๐Ÿ‘พ ๐Ÿ’ฌ Exiting the poetry shell

When you want to exit the shell, you can type exit or ^D


[1] Plan your Class #

It is up to you to choose a real world system to model using OOP. It must include the following:

  • classes
  • objects
  • static variable or static method
  • encapsulation
  • inheritance, composition and/or aggregation
  • 2D array, Stack, or Queue

A few ideas:

  • School: Students, Teachers, Courses
  • Music: Artists, Albums, Songs, Playlists
  • Real world: Mall, Shops
  • Sports: Games, Players w/stats
  • Games: Battleship, Sudoku, Crossword, Connections

โœ๏ธ Create your UML diagram using the Mermaid Live Editor: mermaid.live/edit

๐Ÿ’ป Copy & Paste the code from your UML diagram into the README.md document.


[2] Implement your UML Diagram #

๐Ÿ’ป Implement your classes & test to ensure it works as expected!

๐Ÿ’ป Extension: Create a user interface


[4] Deliverables #

โšกโœจ Once you finish the lab, be sure to complete these two steps:

๐Ÿ“‹ Update Syllabus Checklist: Go to your Syllabus Content Checklist in your Google Drive and update it accordingly.

๐Ÿ’ป Push your work to Github

  • git status
  • git add -A
  • git status
  • git commit -m “describe your code here”
  • git push
  • remote