26
J.E.D.I. Object-oriented Software Engineering Object-oriented Software Engineering is the use of objec t tech nologi es in buildi ng soft ware. Obje ct technol ogy i s a set of p rincip les that guide the construction of the soft ware us ing objec t-ori ented approach. It encompasses all framework of a ctiv ities including analysis, design and testing, and the choice of methodologies, programming languages, tools, databases and applications to engineer a software. In this chapter, we lay the foundation for understanding object-orientation by presenting an explanation of its fundamental concepts such as objects and classes, abstraction, enca psula tion, modula rity an d hierar chy. We als o prese nt a gene ral obj ect-orient ed proce ss mo del tha t follows a comp onent- based a ssembly. We als o intro duce obj ect- oriented analysis and design activities, list down some methodologies, and expected work products. Finally, we will discuss the Uni fied Modeling Language (U ML) and the modeling activity. 1 Review of Object-oriented Concepts At th e very he art of ob ject-o ri enta ti on, we ha ve the ob jects. Objects are representations of entities which can be physical (such as club membership application form and athlete s), c onceptual (squad a ssignment) or software (linked lis t). It allows software engineers to represent real world objects in software design. More technically, it is defined as something that represents a real world object which has a well-defined boundary and identity that encapsulates state and behavior. Attributes and relationships of an object define its  state. It is one of the possible conditions by which an object exists, and it normally changes overtime. In software, the values stored within the attributes and the links of the object with other objects define this s tate. Operations , meth ods an d stat e mach ines, o n the oth er hand , defi ne its behavior . It determines how an obj ect acts and reacts to messag e requests from other objects. It is important that ea ch o bject sh ould be uniquely identifi ed within the s ystem even if they have the same values in the attributes and behavior. Figure 1 depicts examples of objects with their state and behavior that may exists in the case study, Ang Bulilit Liga. Three objects are prese nt- 2 athletes and 1 coac h. In this picture, they are i llustrated as circ les whe re attr ibutes a re foun d in the inner ci rcle su rround ed by metho ds. Objec ts are uniquely identified by their Ids such as in the case of the two athletes,  Joel and  Arjay . Notice that a ttribu tes are enclosed by methods. This sugge sts that only the object can change the values of their own attributes. The changes in the values of the attributes can be triggered by a request, called a message, by anoth er object. In the picture, the coach (  JP ) assigns an athlete (  Joel ) to a squad by executing his method assignToSquad(). This method sends a request message, updateSquad("Training") , to the athlete (  Joel ) to update his squad attribute. A class is a description of a set of objects that share the same attributes, relationships, metho ds, oper ation s and sema ntics. It is an abst racti on that focu ses on th e releva nt characteristics of all objects while ignoring other cha racteristics. Objects are ins tances of classes. In our example,  Joel and Arjay are instances of the class athletes, while  JP is an instance of the class coach. Software Engineering 1

MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

Embed Size (px)

Citation preview

Page 1: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 1/25

Page 2: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 2/25

Page 3: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 3/25

Page 4: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 4/25

Page 5: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 5/25

Page 6: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 6/25

Page 7: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 7/25

Page 8: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 8/25

Page 9: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 9/25

Page 10: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 10/25

Page 11: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 11/25

Page 12: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 12/25

Page 13: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 13/25

Page 14: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 14/25

Page 15: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 15/25

Page 16: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 16/25

Page 17: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 17/25

Page 18: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 18/25

Page 19: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 19/25

Page 20: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 20/25

Page 21: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 21/25

Page 22: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 22/25

Page 23: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 23/25

Page 24: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 24/25

Page 25: MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

8/3/2019 MELJUN_CORTES_JEDI Course Notes SE Chapter02 Object Oriented Concepts

http://slidepdf.com/reader/full/meljuncortesjedi-course-notes-se-chapter02-object-oriented-concepts 25/25