Connected Classes
Lab 7
This week we’ve added some class
to our programs, moving us into the Object-Oriented Programming (OOP) paradigm. Objects are yet another abstraction that we can add to our toolbox. They let us represent distinct entities with their own properties (attributes) and abilities (methods).
In this lab, you’ll be writing your own classes, testing them, and then seeing how we can use them in different applications.
Goals
- Practice creating your own classes
- Practice testing your own classes
- Use classes in two different application domains
- Work with command line arguments
- Practice using input validation
README
Honor Code Reminders:
- Discussing high-level ideas with other students is encouraged, but only show your actual code to course staff (professors/lab helpers/tutors). The only exception is the warmup, which is to be completed in pairs.
- Consulting online resources other than assigned reading or documentation provided by the lab instructions is prohibited. Course staff will be happy to answer any questions you have.
- Use of generative AI for any reason is not allowed. This includes for both writing code and for debugging or reformatting code you wrote.