Summary

This document provides notes on object-oriented programming concepts, UML diagrams, and design patterns. The material covers various object types like entity, control, and boundary objects, and explains object-oriented design principles. An example of UML diagram notation and class structure is included for clarity.

Full Transcript

Entity object = real world object with little application logic (university, student, instructor) Control object = in charge of program control. Doesn’t hold much info (functions like add class) Boundary object = control interactions between system and world (printClasses, UI) Collection object =...

Entity object = real world object with little application logic (university, student, instructor) Control object = in charge of program control. Doesn’t hold much info (functions like add class) Boundary object = control interactions between system and world (printClasses, UI) Collection object = list or array classes type shit UML diagrams have attributes and operations - for private # for protected + for public If abstract class name should be in italics Static members underlined Friendship never shown + scoreGoal(inout scoringTeam:Team) this means void Composition is a “has-a” relationship Collection classes, constructors/destructors, getters/setters are not shown Inheritance is shown with a triangle; not an arrow Don’t list object members with attributes, show the line to the other object Statically allocated array of objects: Date dates[size] dates.print() Dynamically allocated array of objects: Date* dates = new Date[size] dates.print() ​ Remember “Top down inside out” Facade hides the complex stuff with a simpler class (structural) Observer just updates based on what the things it’s subscribing to says (behavioural) Strategy is for algorithms (behavioural) Behaviour is for objects communicate Architectural for how they are grouped into a subsystem ​ Creational for how to create objects Structual for how objects relate

Use Quizgecko on...
Browser
Browser