CS Department   Mt. Holyoke College
CS 341
Software Design

Course Schedule

The following publications are referred to on the schedule below:

Bloch
Joshua Bloch, Effective Java, Addison-Wesley, 2001. An excellent book of programming tips particularly relevant to Java.
Crawford
William Crawford and Jonathan Kaplan, J2EE Design Patterns, O'Reilly, 2003. You can access this book online at http://proquest.safaribooksonline.com/0596004273 or by going to the Library's page for finding books, selecting Safari Books and then searching for this book.
Gamma
Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software, Addison-Wesley, 1995. A classis, oftern referred to in the literature as the Gang of Four book, or GoF for short.
Goetz
Brian Goetz, Java Concurrency in Practice, Addison-Wesley, 2006.
Jia
Xiaoping Jia, Object-Oriented Software Development Using Java, 2nd edition, Addison-Wesley, 2003.
Lea
Doug Lea, Concurrent Programming in Java, 2nd edition, Addison-Wesley, 2000.
Sept. 6: Software engineering principles, Java intro
Readings
Jia, Chapter 1, 3, 4.1-4.4.6
Examples
HelloWorld.java
HelloFromVenus.java
Homework 1: First Sip of Java
Sept. 11: Swing, Java Strings
Readings
Jia, 4.4.8-4.5
Examples
Hello with GUI
Hello from Venus with GUI
Sept. 13: Java Exceptions, Classes and Inheritance
Readings
Jia 4.4-4.7, chapter 5
Homework 2: Postcard maker
Starter project
Sept. 18: Interfaces
Sept. 20: Preconditions, postconditions and invariants
Readings
Jia 6.1-6.2
Readings
Jia 6.3.1-6.3.2
Examples
Dog.java
Barker.java
Biter.java
Wagger.java
NiceDog.java
MeanDog.java
Homework 3: Polynomial
Polynomial.java
Sept. 25: Mountain Day!
Sept. 27: Specificaitons and inheritance, Testing introduction
Readings
Jia, 6.3-6.4
JUnit Test Infected: Programmers Love Writing Tests
Homework 4: Unit testing - due date changed to Friday, Oct. 5 at 5:00 PM
Oct. 2: Unit testing
Readings: None
Oct. 4: .equals, immutability
Readings
Bloch, pages 63-70
Oct. 11: Identifying classes, class diagrams
Readings
Jia, 2.1-2.2
Homework 5: Identifying classes
Slides
Monopoly rules
Class diagram developed in class
Oct. 15-19: Take home midterm
Sample midterm questions
Sample midterm answers
Oct. 16: Sequence diagrams
Readings
Jia, 2.3.1, 2.5.3
Slides
Oct. 18: Discuss project ideas, Singleton pattern, Inheritance vs. composition
Readings
Jia 7.1-7.2.1
Project assignment: description
Oct. 23: Template Method pattern, Programming to interfaces
Readings
Jia 7.2.2-7.2.3
Oct. 25: Strategy pattern
Readings
Jia 7.2.4
Project assignment: existing system design
Oct. 30: Strategy and Factory patterns
Readings
Jia 7.4
Nov. 1: Observer pattern
Readings
Jia 8.1, 8.3.4
Examples
ThermometerWithMVC.jar - Example demonstrating the Model-View-Controller architecture. The model is the thermometer. The model has 2 listeners: the MercuryView and the DigitalView. There are also 2 controllers: the text field for changing the temperature and the menu to select scale. This jar file contains the source and class files.
Project assignment: design of extensions
Nov. 6: Controllers
Readings
Crawford, Chapter 3 through section 3.3.2
Nov. 8: Use Case Controllers
Slides
Nov. 13: UML state diagrams, State pattern
Readings
Jia 2.3.2
Gamma 305-314
Project assignment: phase 1 code
Nov. 15: Design presentations
Nov. 20: Concurrency introduction
Readings
Jia 11.1
Examples
Example with a working cancel button
Example with a controller that enables and disabls buttons
Project assignment: phase 2 code
Nov. 27:Synchronization
Readings
Jia 11.2.1-11.2.2
Slides
Example 1 - Bank Demo using Synchronization
Account.java - race condition occurs if withdraw and deposit are not synchronized
AccountListener.java
BankDemo.java
Depositer.java
Withdrawer.java
Example 2 - Bank Demo using Wait/Notify
Account.java - withdraw waits if it would result in a negative balance; deposit notifies
Withdrawer.java
All other classes are the same as in Example 1.
Nov. 29: Deadlock
Readings
Goetz, pages 205-214
Slides
Minilab 1 Handout: Starting and stopping threads
Minilab 1 Eclipse project
Dec. 4: Minilab day
Minilab 2 Handout: Race Conditions
Minilab 2 Eclipse project
Minilab 3 Handout: Race Conditions
Minilab 3 Eclipse project
Dec. 6: Multi-threaded servers
Readings
Goetz, Chapters 1 and 2
Slides
Project assignment: Final code
Minilab 4 Handout: Multi-threaded servers
Minilab 4 Eclipse project
Dec. 11: Project demo