320 likes | 521 Views
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 .
E N D
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.
Do this while we wait for the lecture to start Assume we are building an online dating app. It allows users to indicate which other users they want to date. Complete the following partial class diagram to show the ‘wants to date’ associations. Man Woman
Assume we are building an online dating app. It allows users to indicate which other users they want to date. Complete the following partial class diagram to show the ‘wants to date’ associations. Man wants to date Woman
Assume we are building an online dating app. It allows users to indicate which other users they want to date. Complete the following partial class diagram to show the ‘wants to date’ associations. Man wants to date Woman
Assume we are building an online dating app. It allows users to indicate which other users they want to date. Complete the following partial class diagram to show the ‘wants to date’ associations. 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 WantsToDate target 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 • …… … …
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 • …… … …
Boil water • Put tea leaves in strainer • Add hot water • Steep for a while • Remove strainer • Add milk and sugar • 1 chef • 2 waiters • 1 cashier • 1 part time accountant • 1 manager • 1 cash register • 1 stove • Serve tea • Clean table • Toast bread • Cut bread • Accept payment • Give change • Issue receipt • Wash utensils • Pay bills • Order supplies • …… … …
4 OOP Abstraction Encapsulation Inheritance Polymorphism
function function Data Data function Data Data function Data Data function Data function Data
function function Data Data function Data Data function Data Data function Data function Data
Student function function Data Data Course Data function Data Data function Data Data function function Data Lecturer
Student function function Data Data
john: Student function function Data Data cs2103: Course damith: Lecturer
john: Student
Student NgStudent PgStudent UgStudent
{abstract} Student NgStudent PgStudent UgStudent
<<interface>> Student NgStudent PgStudent UgStudent
:Lecturer :NgStudent :PgStudent :UgStudent study() foo() study() bar () study() goo ()
:Lecturer :NgStudent :PgStudent :UgStudent study() foo() study() bar () study() goo ()
:Lecturer :NgStudent :PgStudent :UgStudent study() foo() study() bar () study() goo ()
:Lecturer :Student :NgStudent :PgStudent :UgStudent
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
Image credit: http://uxmag.com/articles/the-dirtiest-word-in-ux-complexity
Image credit: http://uxmag.com/articles/the-dirtiest-word-in-ux-complexity
Advanced user Novice user