WARNING
These slides are not optimized for printing or
exam preparation. These are for lecture
delivery only.
These slides are made for PowerPoint 2010.
They may not show up well on other
PowerPoint versions. You can download
PowerPoint 2010 viewer from here.
These slides contain a lot of animations. For
optimal results, watch in slideshow mode.
Let’s talk about the Evolution of (Wo)man…
wants to date
wants to date
*
*
Man
*
*
wants to date
wants to date
*
*
Woman
*
*
On with our lecture proper
Assume we are building an online dating app. It allows
users to indicate which other users they want to date.
The following class diagram shows the ‘wants to date’
associations.
Can the design be simplified?
wants to date
wants to date
*
*
Man
*
*
wants to date
*
*
Woman
wants to date
*
*
wants to date
*
Person
*
Man
Woman
wants to date
*
Person
WantsToDate
*
Man
Woman
1
Person
target
WantsToDate
requestor
1
Man
*
*
Woman
•
•
•
•
•
•
Boil water
Put tea leaves in strainer
Add hot water
Steep for a while
Remove strainer
Add milk and sugar
•
•
•
•
•
•
Boil water
Put tea leaves in strainer
Add hot water
Steep for a while
Remove strainer
Add milk and sugar
•
•
•
•
•
•
Boil water
Put tea leaves in strainer
Add hot water
Steep for a while
Remove strainer
Add milk and sugar
• Serve tea
•
Clean table
•
Toast bread
•
•
•
Cut bread
Accept payment
Give change
•
Issue receipt
•
•
Wash utensils
Pay bills
•
•
Order supplies
…… … …
Procedural
•
•
•
•
•
•
Boil water
Put tea leaves in strainer
Add hot water
Steep for a while
Remove strainer
Add milk and sugar
• Serve tea
•
Clean table
•
Toast bread
•
•
•
Cut bread
Accept payment
Give change
•
Issue receipt
•
•
Wash utensils
Pay bills
•
•
Order supplies
…… … …
Procedural
OOP
•
•
•
•
•
•
•
1 chef
2 waiters
1 cashier
1 part time accountant
1 manager
1 cash register
1 stove
•
•
•
•
•
•
Boil water
Put tea leaves in strainer
Add hot water
Steep for a while
Remove strainer
Add milk and sugar
• Serve tea
•
Clean table
•
Toast bread
•
•
•
Cut bread
Accept payment
Give change
•
Issue receipt
•
•
Wash utensils
Pay bills
•
•
Order supplies
…… … …
OOP
Abstraction
Encapsulation
Inheritance
pOlymorphism
function
Data
Data
Data
function
Data
function
function
Data
Data
Data
function
Data
function
function
Data
Data
Data
function
Data
function
function
Data
Data
Data
function
Data
function
Student
Course
Lecturer
Student
john:
Student
cs2103:
Course
hchia:
Lecturer
john:
Student
Student
UgStudent
NgStudent
PgStudent
{abstract}
Student
UgStudent
NgStudent
PgStudent
<<interface>>
Student
UgStudent
NgStudent
PgStudent
:Lecturer
:UgStudent
:NgStudent
:PgStudent
study()
foo()
study()
study()
bar ()
goo ()
:Lecturer
:UgStudent
:NgStudent
:PgStudent
study()
foo()
study()
study()
bar ()
goo ()
:Lecturer
:UgStudent
:NgStudent
:PgStudent
study()
foo()
study()
study()
bar ()
goo ()
:Student
:Lecturer
:UgStudent
:NgStudent
:PgStudent
OOP
Architecture
•
•
•
•
•
•
•
Divisions/Departments
• Kitchen
• Accounting
• Customer Services
• Purchasing
1 chef
2 waiters
1 cashier
1 part time accountant
1 manager
1 cash register
1 stove
OOP
Architecture
OOP
Architecture
Architecture
B
A
Achievement
Unlocked!
Top-down multilevel design
D
C
OOP Component design
Component A design
A
*
Component C design
B
C
*
D
C
Component B design
Component D design
Achievement
yet to be unlocked!
Software Reuse
Writing from scratch is
better?
Can you imagine trying to
become a poet without
reading poems written
by other poets?
Open Source projects
Achievement yet to
be unlocked!
Effort estimation
Promise only what
you can deliver,
deliver what you
promised.
L1-L6
Basic SE knowledge [up to B+]
Theory covered
Practice in project internalize
L7-L12
Intermediate SE knowledge [A- to A+]
Today
Better design
Better code
Better documentation
© Copyright 2026 Paperzz