Lecture 12: Software Engineering

What You Will Learn Today

  1. Describe the nature of computing and the software development process, including activities, models, roles and goals.
  2. Describe recommended programming practices and factors relating to programmer productivity.
  3. Design classes, relationships and object-oriented programs.

The Nature of Computing

The Software Development Process

Development Process Goals

Develop an approach to software development that is:

Recommended Programming Practices

Source: Extreme Programming, Kent Beck, 1999, as listed in Horstmann p. 619

Programmer Productivity

Prototyping

Steps for Designing Classes

  1. Discover classes (concepts and their attributes)
  2. Discover responsibilities of each class (methods)
  3. Discover relationships between classes (any collaborative classes for each method)

Types of Relationships

Diagram Type Description Example
-----|> inheritance is-a (extends) a dog is an animal
.......|> realization implements a string implements comparable
------> association has-a (dependency; objects are stored as attributes of another object) a car has tyres
........> dependency uses (uses another class but doesn't store the object directly in it) an applet uses graphics
-----<> aggregation association with part-whole relationship a class has students
----<*> composition aggregation with a part only belonging to one whole a person has arms

Steps for Designing Object-Oriented Programs

To Do After Class