PantryPal is a Java-based pantry tracking application developed as part of the INF1005H: Information Workshop I course at the University of Toronto. The project’s goal was to design and implement an object-oriented system that helps users manage pantry inventory efficiently - allowing them to add, search, and monitor various pantry items such as spices, grains, canned goods, baking supplies, and condiments.
This project demonstrates practical application of Object-Oriented Programming (OOP) principles - abstraction, encapsulation, inheritance, polymorphism, and composition - through the creation of modular, reusable, and extensible code.
- Pantry Item Management: Add, update, and view pantry items such as spices, grains, and condiments.
- Automated Categorization: Each item type is represented by a subclass with specific attributes and methods.
- Encapsulation and Abstraction: Core item details are secured and accessed through getter and setter methods.
- Composition: The Date class stores expiry and purchase dates to enhance item traceability.
- Extensible Design: Built to easily integrate additional pantry item types or features in the future.
- Abstraction & Encapsulation: Each class represents a real-world entity while hiding internal data through private variables and public methods.
- Inheritance: Subclasses such as Spices, BakingSupplies, and Condiments extend from the abstract superclass PantryItem.
- Polymorphism: Subclasses override methods (e.g., getName(), getQuantity()) to provide custom implementations.
- Composition: The Date class is composed within certain subclasses, emphasizing a “has-a” relationship.
- Clone the repository.
- Open the project in your preferred Java IDE (e.g., IntelliJ IDEA, Eclipse, VS Code).
- Compile and run the Controller.java file located in the src/ folder.
- Follow on-screen prompts to interact with the pantry system.