Software engineeringLesson 2 of 3 in the course Design patterns
Singleton Pattern: Initialization, Concurrency, and Trade-offs
5 flashcards · 5 quiz questions · 5 match pairs · 5 fill-in sentences · English
Lesson progress
0 / 5
Your progress is kept in this browser only.Sign up to save it
Summary
The singleton pattern restricts a class to a single instance and provides a way to access that instance. This lesson explains what the pattern is designed to do, why developers use it, and where it commonly appears.
In object-oriented programming, a singleton is a design pattern that ensures a class has only one instance and provides access to that instance. It is one of the well-known Gang of Four design patterns, which describe recurring solutions to software design problems.
All flashcards
Quiz questions
Based on the Wikipedia article Singleton pattern, licensed CC BY-SA 4.0. Adapted into a summary, flashcards and quizzes.
More in Software engineering
All Software engineering lessonsSoftware engineeringUML Concepts, Diagram Types, Artifacts, and Model Exchange5 flashcards · 5 quiz questions · 4 gamesPlay free →Software engineeringSoftware Testing: Concepts, Methods, and Processes5 flashcards · 5 quiz questions · 4 gamesPlay free →Software engineeringSoftware Design: Iteration, Quality Attributes, and Modeling5 flashcards · 5 quiz questions · 4 gamesPlay free →Software engineeringSoftware Design Patterns: Documentation, Categories, and Trade-offs5 flashcards · 5 quiz questions · 4 gamesPlay free →Software engineeringUnit Testing: Test Design, TDD, and Practical Limits5 flashcards · 5 quiz questions · 4 gamesPlay free →Software engineeringWaterfall Software Development: Phases, History, and Trade-offs5 flashcards · 5 quiz questions · 4 gamesPlay free →