UNIHIVE

Study Hub UNIPORT CSC 486

CSC 486 · Systems Analysis And Design

Object-oriented analysis and design with UML

Objects, classes and OO principles, and the main UML diagrams: use case, class, sequence, activity and state diagrams, with examples.

Our notes

2 min read

Object-oriented ideas

An object bundles data (attributes) and behaviour (methods); a class is a template for objects.

  • Encapsulation: hide internal data; use it only through methods.
  • Inheritance: a class takes attributes and methods from a parent (PostgraduateStudent inherits from Student).
  • Polymorphism: one method name, different behaviour in different classes (calculateFees() differs for undergraduates and postgraduates).
  • Abstraction: show only what matters.

Structured vs OO: structured analysis separates data (ERD) and processes (DFD); OO keeps them together in objects, which often maps better to real-world things and supports reuse.

UML (Unified Modeling Language)

A standard set of diagrams (managed by the OMG) for modelling systems. Structural diagrams (class, object, component, deployment) and behavioural diagrams (use case, sequence, activity, state).

Use case diagram

Shows actors (stick figures: users or other systems) and use cases (ovals: goals) inside the system boundary.
Example: Actor Student → use cases: Log in, Register courses, Print course form, View results. Actor Lecturer → Upload scores. Actor Admin → Manage courses.

  • «include»: a use case always uses another (Register courses «include» Log in).
  • «extend»: optional behaviour (Register courses «extend» Add carry-over course).

Each use case has a written description: actor, preconditions, main flow, alternative flows, postconditions.

Class diagram

Boxes with three parts: class name, attributes, methods.
Student — matricNo, name, level — register(), viewResult().
Course — code, title, units — getUnits().
Relationships:

  • Association (line) with multiplicity: Student 1..* — 0..* Course.
  • Generalisation/inheritance (hollow triangle arrow): Postgraduate → Student.
  • Aggregation (hollow diamond: a whole with parts that can exist alone: Department ◇— Lecturer).
  • Composition (filled diamond: parts die with the whole: Course form ◆— Course line).

Sequence diagram

Shows objects across the top and messages between them over time (downwards). Example: Student → RegistrationPage: selectCourses() → RegistrationController: checkUnits() → Database: saveRegistration() → returns confirmation.

Activity diagram

Like a flowchart: start (filled circle), actions (rounded boxes), decisions (diamonds), forks and joins (bars for parallel activities), end (bull's-eye). Good for business processes and use-case flows.

State machine diagram

Shows the states of one object and the events that change them: Registration: Draft → Submitted → Approved by adviser → Locked (or Rejected → Draft).

OO analysis steps

  1. Find use cases from requirements.
  2. Find candidate classes (nouns in the requirements) and their responsibilities (verbs become methods).
  3. Draw class diagrams with relationships.
  4. Model interactions (sequence diagrams) for each important use case.
  5. Refine into design classes for the chosen language and database.

Exams usually ask: define the OO principles with examples; draw a use case diagram (with include/extend) and a class diagram for a scenario; association vs aggregation vs composition; draw a sequence or activity diagram; structured vs OO approaches.

Common mistake: putting system functions as actors. Actors are outside the system (people or other systems), use cases are what they want done.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All CSC 486 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.