San Jose State University : Site Name


Main Content

Working in Mars Mission Control, JPL

Ronald Mak

Department of Computer Engineering
Fall Semester 2017

Office hours: TuTh: 3:00-4:00 PM
Office location: ENG 250
Mission Control, Jet Propulsion Laboratory (JPL)
NASA Mars Exploration Rover Mission

CMPE/SE 135 Object-Oriented Analysis and Design

Th 1:30 - 2:45 PM, room BBC 226


# Assigned Due Assignment
1 Aug 31 Sep 8 Functional Specification

Use case form: UseCaseForm.docx
Formal report rubrics: FormalReportRubrics.pdf
2 Sep 7 Sep 15 Design Specification
3 Sep 19 Sep 29 Initial Implementation
4 Oct 26 Nov 15 Design Patterns


Date Content
Aug 24 Slides: Course objectives; project teams; postmortem report; grading; good applications; change and complexity; how to achieve good design; iterative process; poor design not a failure; Rick's Guitars; problems
Aug 29 Slides: Continued iterations: (#2) remove string fields and return multiple matches, (#3) encapsulate what changes, (#4) new characteristics, (#5) refactored code, delegate matching

Example programs:
Aug 31 Slides: Summary; OOA&D is about satisfaction; requirements elicitation; functional and nonfunctional; requirements of requirements; how to get requirements; use cases; use case descriptions; Functional Specification; Assignment #1
Sep 5 Slides: Key points for good design; iterative development; solutions to adding a new mandolin instrument; Instrument and InstrumentSpec classes; abstract classes; revised Inventory class; Guitar, GuitarSpec, Mandolin, MandolinSpec classes; red flags; more instruments; design doesn't scale well; encapsulation to the rescue; re-revised InventorySpec and Inventory classes; conclusions

Example programs:
Sep 7 Slides: Analysis precedes design; key points for success; change; paralysis by analysis; where do classes come from; categories of classes; class responsibilities; class relationships: dependency, aggregation, inheritance; UML diagrams; class diagrams; sequence diagram; Assignment #2
Sep 12 Slides: Textual analysis; CRC cards; UML class diagrams: dependency, association, examples; UML state diagram; proposed C++ Date class; code to the interface; factory method design pattern; Day class
Sep 14 Slides: Day class implementations; importance of encapsulation; principles; accessors and mutators; dangerous setter; no surprises; immutable classes; sharing references to immutable objects; const fields; separate accessors and mutators
Sep 19 Slides: Side effects; Law of Demeter; how good is an interface?; cohesion; completeness; convenience; clarity; consistency; programming by contract; preconditions; circular queue example; Assignment #3
Sep 21 Slides: Preconditions; circular queue example; assertions; exceptions; postconditions; class invariants; proof of a class invariant; interface invariant vs. implementation invariant
Sep 26 Slides: Simple machine learning for RPS; interfaces; interfaces and the RPS game; code to the interface; factory class; interface variables; objects and interfaces; typeid()
Sep 28 No class: Job Fair
Oct 3 Slides: Inheritance; superclasses and subclasses; class hierarchies; Liskov Substitution Principle; overridden member functions; polymorphism; invoke a superclass member function; invoke a superclass constructor; invoke a constructor from another; preconditions and inheritance; postconditions and inheritance; more inheritance conditions; examples: point-circle-rectangle, vector-stack

Example programs: Animal.cpp   Person.cpp   PointCircleRectangle.cpp   VectorStack.cpp
Oct 5 Slides: SimUDuck simulation game; code reuse; delegation; abstract superclass; "has a" better than "is a"

Example programs:
Oct 10 Slides: Midterm review; bonus lecture
Oct 17 Slides: Midterm solutions; arrays of objects; constructors and destructors; vectors of objects; copy constructor; "extra" constructor and destructor calls; how a vector grows; dynamic array of objects; mysterious program crash; shallow vs. deep copy
Oct 19 Slides: C++ chrono library; function parameters; timing functions; auto keyword; decltype pseudo-function; function definitions in header files; inline keyword; the "Big Three"
Oct 24 Slides: Review: object-oriented design basics and principles; design patterns; shared pattern vocabulary; how to use design patterns; the Strategy Pattern; weather monitoring station example; subscriptions; observer pattern defined; observer pattern UML; loose coupling; weather station design and implementation; display elements implementation; observer pattern summary
Oct 26 Slides: Starbuzz Coffee example; initial design; second design; open-closed principle; the Decorator Pattern; UML; Starbuzz design, implementation, and test; Decorator Pattern caveats
Oct 31 Slides: new => concrete; Pizza shop example; simple pizza factory; pizza store framework; PizzaStore subclasses; factory method; abstract and concrete Pizza classes; Factory Method Design Pattern; factory method defined; dependency inversion; families of ingredients; ingredient factories; Abstract Factory Design Pattern; factory method vs. abstract factory
Nov 2 Repeat of Oct 31.
Nov 7 Slides: Singleton design pattern; chocolate factory example; multithreading problems; double-checked locking; adapters; turkey adapter example
Nov 9 Slides: Facade design pattern; home theater example; principle of least knowledge; state design pattern; gumball machine example
Nov 14 Slides: Menus and waitress example; different ways to iterate; iterator design pattern; composite design pattern; null iterator
Nov 16 Slides: Coffee and tea recipes; first design; refactored classes; template method design pattern; advantages; hooks; dependency rot; design pattern defined; pattern categories; thinking in patterns; mind on patterns; shared vocabulary; Gang of Four; Christopher Alexander
Nov 21 Slides: Qt and design patterns; extensions to C++; QStringList and iteration; abstraction of the GUI; Qt Creator; signals and slots; example Qt programs: Simple, Factorials, text finder

Example programs: simple.cpp   factorial.cpp
Nov 28 Slides: Qt ToDo example; signals, slots, and connect functions; task form; layouts; adding tasks; dialog box; renaming and removing tasks; C++ lambda functions; checkbox event handling

Example Qt ToDo program:
Nov 30 Slides: Lambda expressions; Qt cross-platform development

Example lambda expressions:
Example Qt cross-platform program:
Dec 5 Slides: Multithreading; QThread; Qt thread pools; Mandelbrot set example;

Example Qt multithreading program:


Become familiar with object-oriented analysis and program design, and with industry-standard practices of an object-oriented approach to software development.

The primary goal of this course is to become a much better programmer.

The instructor will share decades of experience as a successful software developer in industry, government, and scientific research institutions. The programming examples will be mostly in C++, but the material will apply well to other object-oriented languages such as Java and Ruby.

You will develop the critical job skill of working in a small project team to successfully develop a software application that uses shared interfaces and data formats. Your application can then interact with applications from other teams to exchange data and results.


For SE Majors: CS 046B, or for others: CMPE 126

Required books