The Singleton design pattern is a programming approach to the problem of making sure you only ever have one object of a particular class at any time. The approach involves effectively hiding the object so that it appears to not exist until the first time it is called. On the second and subsequent times it's called, the object is returned with no need to create it again. Learn more in this online video "Example: the singleton pattern."
I'm going to go through two design patterns and illustrate them as simply as…possible, one with code and one without.…So you both see an implementation of one, and you get the general idea that this…same Design Pattern could be done in multiple programming languages.…But it's always the idea, the approach, that matters.…Now first up is the Singleton Design Pattern and here's the problem…it's designed to solve.…We create a class, and we know the classes can be instantiated once or twice or…a thousand times, but what if you only want one object of that class.…
What if you want to restrict this.…In fact, you need there to be only one object of this class?…What if this one object needs to represent the currently running application or…perhaps the current display and having more than one instantiated object just…doesn't make sense and could even lead to problems with the application.…There is actually quite a lot of situations where there should only be one…object of a particular class.…Now this might first sound a little like an Abstract Class, but remember an…
Let Simon Allardice introduce you to the terms—words like abstraction, inheritance, polymorphism, subclass—and guide you through defining your requirements and identifying use cases for your program. The course also covers creating conceptual models of your program with design patterns, class and sequence diagrams, and unified modeling language (UML) tools, and then shows how to convert the diagrams into code.
- Why use object-oriented design (OOD)?
- Pinpointing use cases, actors, and scenarios
- Identifying class responsibilities and relationships
- Creating class diagrams
- Using abstract classes
- Working with inheritance
- Creating advanced UML diagrams
- Understanding object-oriented design principles
Skill Level Intermediate
1. Core Concepts
2. Object-Oriented Analysis and Design
Defining requirements6m 9s
3. Utilizing Use Cases
4. Domain Modeling (Modeling the App)
5. Creating Classes
6. Inheritance and Composition
7. Advanced Concepts
8. Object-Oriented Design Patterns
9. Object-Oriented Design Principles
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.