Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSC307 Lecture 10

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

CSC307 Lecture 10

Introduction to Software Engineering
Patterns II
(202407)

Javier Gonzalez-Sanchez PRO

February 09, 2026

Transcript

42 slides
  1. Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.info o ffi ce: 14 -227

    CSC 307 Introduction to Software Engineering Lecture 10. Patterns
  2. De f inition • Design patterns a re solutions to

    softw a re design problems you f ind a g a in a nd a g a in in re a l-world a pplic a tion development. • P a tterns a re a bout reusable designs a nd inter a ctions between objects. • The 23 G a ng of Four (GoF) patterns a re gener a lly considered the found a tion for a ll other p a tterns (G a mm a , Helm, Johnson, a nd Vlissides). 6
  3. Singleton class Singleton{ private static Singleton _instance; // Constructor is

    'protected' protected Singleton() {} public static Singleton getInstance(){ if (_instance == null){ _instance = new Singleton(); } return _instance; } } 10 https://github.com/CSC3100/Patterns
  4. Warning 12 Do not Abuse of the Singleton You are

    transforming OOP into Structural Programming!! 🙈
  5. Important 25 Do not reinvent the wheel! (Do not make

    another implementation for classes Observer or Observable -they already exist in libraries!)
  6. CSC 307 Introduction to Software Engineering Javier Gonzalez-Sanchez, Ph.D. [email protected]

    Winter 2026 Copyright. These slides can only be used as study material for the class CSC307 at Cal Poly. They cannot be distributed or used for another purpose.

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming