COMMANDS TO RUN:
CHATAPP: Compile: 1.cd src/main/java 2.javac com/chatapp/*.java Run Server: 3.java com.chatapp.ServerMain Run Client: 4.java com.chatapp.ChatApplication
EX-1 Behavioral Design Patterns
- Observer Pattern Use Case: A weather monitoring system that notifies various display devices (e.g., phone, tablet, and computer) whenever there is a change in the weather data.
- Strategy Pattern Use Case: A payment processing system where the user can choose different payment methods (e.g., Credit Card, PayPal, and Bitcoin). Creational Design Patterns
- Singleton Pattern Use Case: A logging system where only one instance of the logger should be used throughout the application.
- Factory Method Pattern Use Case: A document editor that can create different types of documents (e.g., Word, Excel, and PDF). Structural Design Patterns
- Adapter Pattern Use Case: An old media player that can play audio files, but we need it to play video files as well using a new video player.
- Decorator Pattern Use Case: A text editor that can add various functionalities (e.g., spell check, grammar check, and auto-completion) to a basic text editor.
compile and run: 1.cd src 2.javac com/example/*.java 3.java com.example.Main