This repository contains Java programs that demonstrate various concepts in Object-Oriented Analysis and Design (OOD) and Design Patterns. The labs cover topics related to multiple interface/inheritance and various design patterns. Each lab experiment is implemented as a separate Java program.
- The program in this experiment demonstrates the use of multiple interfaces/inheritance in a Java application. The application chosen showcases the practical application of this concept.
- This experiment involves the implementation of a PET management system, covering aspects related to PET shops, PET care, and PET services. The program follows appropriate object-oriented design principles.
- Write a Java program to demonstrate the implementation of a facade design pattern for a Banking Service with Checking, Saving, and Investment modules.
- Expressing this in Java can be broken down into steps
- Design the interface
- Implement the interface with one or more classes
- Create the facade class and wrap the classes that implement the interface.
- Use the facade class to access the subsystem
- Write a Java program to demonstrate the implementation of a composite design pattern by using an example with a building composed of generic housing structures.
- Expressing this in Java can be broken down into steps
- Design the interface that defines the overall type
- Implement the composite class
- Implement the leaf class
- Write a Java program to demonstrate the implementation of a proxy pattern for an online retail store with global distribution and warehousing.
- Expressing this in Java can be broken down into steps
- Design the subject interface
- Implement the real subject class
- Implement the proxy class
- Write a Java program to demonstrate the implementation of a decorator pattern for a web page, which might display complex behavior, such as only allowing access to authorized users, or splitting search results across multiple pages.
- Expressing this in Java can be broken down into steps
- Design the component interface
- Implement the interface with your base concrete compoent class
- Implement the interface with your abstract decorator class
- Inherit from the abstract decorator and implement the component interface with concreate docorator classes.
- Write a Java program to demonstrate the implementation of a state design pattern for a vending machine functionality on purchasing items.
Experiment | Description | Code Link |
---|---|---|
1. Multiple Interface/Inheritance Demonstration | Understand the power of multiple interfaces/inheritance in Java. The program in this experiment demonstrates the practical application of this concept. | Code |
2. PET Management System | Implement a PET management system, incorporating object-oriented design principles. Covering aspects related to PET shops, PET care, and PET services. | Code |
Experiment | Description | Code Link |
---|---|---|
3. Facade Design Pattern for Banking Service | Implement a facade design pattern for a Banking Service with Checking, Saving, and Investment modules. The Java program demonstrates the design and usage of the facade pattern. | Code |
4. Composite Design Pattern for Generic Housing Structures | Demonstrate the composite design pattern using a building composed of generic housing structures. Learn how to design interfaces, implement composite classes, and create leaf classes. | Code |
5. Proxy Design Pattern for Online Retail Store | Implement a proxy pattern for an online retail store with global distribution and warehousing. This Java program guides you through designing subject interfaces, implementing real subjects, and creating proxy classes. | Code |
6. Decorator Design Pattern for a Web Page | Implement a decorator pattern for a web page, displaying complex behavior like access control and search result pagination. | Code |
7. State Design Pattern for Vending Machine Functionality | Implement a state design pattern for a vending machine functionality on purchasing items. | Code |