OOP Unit 6 Session5
OOP Unit 6 Session5
214444.2 Identify classes, objects, methods, and handle object creation, initialization, and Destruction to L2
model real-world problems.
214444.3 Identify relationship among objects using inheritance and polymorphism principles L2
214444.5 Develop a real world application using files for persistent data storage L6
• By using the design patterns you can make your code more flexible,
reusable and maintainable. It is the most important part because java
internally follows design patterns.
• Problem Given:
• Suppose you want to create a class for which only a single instance
(or object) should be created and that single object can be used by all
other classes.
• Solution:
• Singleton design pattern is the best solution of above specific
problem. So, every design pattern has some specification or set of
rules for solving the problems.
Creational Design Pattern - Singleton
• Singleton Pattern says that just "define a class that has only one instance
and provides a global point of access to it".
}
Student’s evaluation