object-Oriented Software Engineering Practical Software development using uml and Java Chapter 2: Review of object Orientation www.lloseng.com
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 2: Review of Object Orientation
2. 1 What is object Orientation? Procedural paradigm Software is organized around the notion of procedures Procedural abstraction -Works as long as the data is simple Adding data abstractions -Groups together the pieces of data that describe some entit -Helps reduce the system's complexity Such as records and struc Object oriented paradigm: Organizing procedural abstractions in the context of data abstractions www.lloseng.com O Lethbridge/Laganiere 2001 Chapter 2: Review of object Orientation
© Lethbridge/Laganière 2001 Chapter 2: Review of Object Orientation 2 2.1 What is Object Orientation? Procedural paradigm: • Software is organized around the notion of procedures • Procedural abstraction —Works as long as the data is simple • Adding data abstractions —Groups together the pieces of data that describe some entity —Helps reduce the system’s complexity. - Such as Records and structures Object oriented paradigm: • Organizing procedural abstractions in the context of data abstractions
object Oriented paradigm An approach to the solution of problems in which all computations are performed in the context of objects. The objects are instances of classes, which are data abstractions -contain procedural abstractions that operation on the objects A running program can be seen as a collection of objects collaborating to perform a given task www.lloseng.com O Lethbridge/Laganiere 2001 Chapter 2: Review of object Orientation
© Lethbridge/Laganière 2001 Chapter 2: Review of Object Orientation 3 Object Oriented paradigm An approach to the solution of problems in which all computations are performed in the context of objects. • The objects are instances of classes, which: —are data abstractions —contain procedural abstractions that operation on the objects • A running program can be seen as a collection of objects collaborating to perform a given task
A View of the Two paradigms main Account credit perform transactio debit credit(debit(compute interes compute fees if checking if checking CheckingAccount Sav ings Accour then xxx then xxx if sav ings if savin compute interest compute interest then xxx then xxx compute fees etc etc www.lloseng.com O Lethbridge/Laganiere 2001 Chapter 2: Review of object Orientation 4
© Lethbridge/Laganière 2001 Chapter 2: Review of Object Orientation 4 A View of the Two paradigms main perform transaction compute fees if checking then xxx if sav ings then xxx etc. compute interest if checking then xxx if sav ings then xxx etc. credit debit Account credit debit Sav ingsAccount compute interest compute f ees CheckingAccount compute interest compute f ees
2.2 Classes and objects Obiect a chunk of structured data in a running software system ° Has properties -Represent its state as behaviou How it acts and reacts -May simulate the behaviour of an object in the real world www.lloseng.com O Lethbridge/Laganiere 2001 Chapter 2: Review of object Orientation
© Lethbridge/Laganière 2001 Chapter 2: Review of Object Orientation 5 2.2 Classes and Objects Object • A chunk of structured data in a running software system • Has properties —Represent its state • Has behaviour —How it acts and reacts —May simulate the behaviour of an object in the real world