San Jose State University : Site Name

Navigation

Main Content

Working in Mars Mission Control, JPL

Ronald Mak

Department of Computer Engineering
Fall Semester 2018

Office hours: TuTh: 3:00-4:00 PM
Office location: ENG 250
E-mail: ron.mak@sjsu.edu
Mission Control, Jet Propulsion Laboratory (JPL)
NASA Mars Exploration Rover Mission

CMPE/SE 135 Object-Oriented Analysis and Design


Section 1:  TuTh  1:30 - 2:45 PM  room ENG 301


Assignments

# Assigned Due Assignment
1 Aug 28 Sep 5 Functional Specification

Use case form: UseCaseForm.docx
Formal report rubrics: FormalReportRubrics.pdf
2 Sep 6 Sep 17 Design Specification
3 Sep 18 Sep 26 Rock-Paper-Scissors Game
4 Sep 25 Oct 5 RPS Game with Simple Machine Learning
5 Oct 2 Oct 29 GUI-Based RPS Game
6 Nov 1 Nov 16 Design Patterns

Lectures

Week Date Content
1 Aug 21 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 23 Slides: Continued iterations: (#2) remove string fields and return multiple matches, (#3) encapsulate what changes, (#4) new characteristics, (#5) refactored code, delegate the matching task

Example programs: RicksGuitar-1.zip   RicksGuitar-2.zip   RicksGuitar-3.zip   RicksGuitar-4.zip   RicksGuitar-5.zip
2 Aug 28 Slides: Summary; cohesion; loose coupling; 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
Aug 30 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?

Example programs: RicksMusic-1.zip
3 Sep 4 Slides: Revisit our design; encapsulate with a hash map; use the Boost C++ library; boost::any; new attribute classes; the improved design; conclusions

Example programs: RicksMusic-2.zip   Boost C++ library
Install the Boost header files (no need to build the libraries) and tell Eclipse (or use the -I option on the command line) where you installed them.
Sep 6 Slides: Complexity; decomposition: algorithmic and object-oriented; hierarchy; design in software engineering; analysis precedes design; 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
4 Sep 11 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 design
Sep 13 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

Example program: Day.h   Day.cpp   DayTester.cpp
5 Sep 18 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 20 Slides: Preconditions; circular queue example; assertions; exceptions; postconditions; class invariants; proof of a class invariant; interface invariant vs. implementation invariant; interfaces; RPG game; code to the interface; factory class; interface variables; objects and interfaces

Example program: AssertExample.cpp
6 Sep 25 Slides: Simple machine learning for RPS; Assignment #4; 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
Sep 27 Slides: Fix point-circle-rectangle and vector-stack; SimUDuck simulation game; code reuse; delegation; abstract superclass; "has a" better than "is a"; virtual destructors

Example programs: SimUDuck.zip   VirtualDestructor.zip
7 Oct 2 Slides: Model-View-Controller (MVC) architecture; events; event handlers; callback functions; inversion of control; wxWidgets; Eclipse; hello world example; buttons demo; Assignment #5

Example wxWidgets programs: helloworld.cpp   ButtonDemo.zip
Oct 4 Slides: Software frameworks; building and installing wxWidgets; samples and demos; documentation; wx-RPS on Mac, Linux, and Windows
8 Oct 9 Slides: Midterm review; requirements video
9 Oct 16 Slides: Midterm solutions; wxWidgets installation lab
Oct 18 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
10 Oct 23 Slides: Starbuzz Coffee example; initial design; second design; open-closed principle; the Decorator Pattern; UML; Starbuzz design, implementation, and test; Decorator Pattern caveats
Oct 25 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
11 Oct 30 Slides: Singleton design pattern; chocolate factory example; multithreading problems; double-checked locking; adapters; turkey adapter example
Nov 1 Slides: Facade design pattern; home theater example; principle of least knowledge; state design pattern; gumball machine example
12 Nov 6 Slides: Menus and waitress example; different ways to iterate; iterator design pattern; composite design pattern; null iterator
Nov 8 Slides: Lambda expressions; arrays of objects; constructors and destructors; vectors of objects; copy constructor; "extra" constructor and destructor calls; how a vector grows; dynamic arrays of objects; mysterious program crash; shallow copy; deep copy
13 Nov 13 Slides: "Safe" array versions; assignment operator; "Big Three"; template functions; template classes

Example programs: SafeArray1.zip   SafeArray2.zip   SafeArray3.zip   SafeArray4.zip   SafeArray5.zip   SafeArray6.zip   TemplateFunction.zip   TemplateClass.zip
Nov 15 Smoked out. No class.
14 Nov 20 Slides: Overloading vs. overriding; why overload; why override; Standard Template Library (STL); iterators: vector, kinds, reverse; containers; linked list vs. vector; pointers vs. references; use of references; exception handling

Example programs: Override.cpp   IteratorVector1.cpp   IteratorVector2.cpp   exception1.cpp   exception2.cpp   exception3.cpp
15 Nov 27 Slides: Auto keyword; decltype pseudo-function; raw pointers vs. smart pointers; unique pointer; shared pointer; move semantics; presentation schedule

Example programs: SmartPtrUnique.zip   SmartPtrShared.zip   Move.zip
Nov 29 Slides: Multithreaded programming; concurrency vs. parallelism; race condition; critical regions and shared resources; mutual exclusion; mutexes; sleep and wakeup; semaphores; Pthreads package

Example multithreaded program: officehour-mac.cpp
16 Dec 4 Slides:
Presentations: #include "TeamName.h", CraZ CoderZ, Moon Cakes, qwerty
Dec 6 Slides: Final project submission; final exam; review for the final exam

Presentations: Titans, main.cpp, One with the Object, Jam

Goals

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

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.

You will follow industry-standard best practices and use software development tools that are common in today’s software industry.

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.

Department policy is to enforce
all course prerequisites strictly

Prerequisites

For SE Majors: CS 046B
For others: CMPE 126

Required books

There is no required textbook. You will receive reading material during the semester.