Presentation is loading. Please wait.

Presentation is loading. Please wait.

Informática II Prof. Dr. Gustavo Patiño MJ 16- 18 05-09-2013.

Similar presentations


Presentation on theme: "Informática II Prof. Dr. Gustavo Patiño MJ 16- 18 05-09-2013."— Presentation transcript:

1 Informática II Prof. Dr. Gustavo Patiño MJ

2 Informática II. Facultad de Ingeniería. Universidad de Antioquia

3  A model is a simplification of reality.  Main reason for developing models:  Understanding the system being developed.  We build models of complex systems because we can not comprehend such a system in its entirety. Informática II. Facultad de Ingeniería. Universidad de Antioquia

4  The choice of the model has a significant impact on how the problem is approached and how a solution is devised.  A model can be expressed at different levels of precision.  A good model is connected to reality.  A single model is not sufficient to represent most systems. ▪ A set of nearly independent models are required. Informática II. Facultad de Ingeniería. Universidad de Antioquia

5  Modeling is an essential part of all the disciplines in engineering, including software engineering.  The importance of having a “good” model increases with the complexity of the project. Informática II. Facultad de Ingeniería. Universidad de Antioquia

6  Software engineering is an engineering discipline.  A modeling technique suitable for the programming approach should be used.  Since object-oriented approach has proven to be superior to other approaches, models designed for this approach are widely used in software engineering. Informática II. Facultad de Ingeniería. Universidad de Antioquia

7  Objects are abstractions of real-world or system entities and manage themselves.  Objects are independent and encapsulate state and representation information. Informática II. Facultad de Ingeniería. Universidad de Antioquia

8  System functionality is expressed in terms of object services.  Shared data areas are eliminated. Objects communicate by message passing.  Objects may be distributed and may execute sequentially or in parallel. Informática II. Facultad de Ingeniería. Universidad de Antioquia

9  Easier maintenance.  Objects may be understood as stand-alone entities.  Objects are appropriate reusable components.  For some systems, there may be an obvious mapping from real world entities to system objects. Informática II. Facultad de Ingeniería. Universidad de Antioquia

10

11  OOA is concerned with developing an object model of the application domain.  OOD is concerned with developing an object- oriented system model to implement requirements.  OOP is concerned with realising an OOD using an OO programming language such as Java or C++. Informática II. Facultad de Ingeniería. Universidad de Antioquia

12  Object Orientation  Abstraction  Encapsulation  Modularity  Hierarchy Informática II. Facultad de Ingeniería. Universidad de Antioquia

13  A model that includes most important aspects of a given problem while ignoring less important details.  An example of an item purchasing abstraction. Informática II. Facultad de Ingeniería. Universidad de Antioquia Counter Queue Item

14  Hide implementation from clients  Clients depend on interface Informática II. Facultad de Ingeniería. Universidad de Antioquia

15  The breaking up of something complex into manageable pieces or modules Canteen System Queue Order Placement Delivery Billing Informática II. Facultad de Ingeniería. Universidad de Antioquia

16  Level of abstraction Increasing abstraction Decreasing Abstraction Art Music FilmsSculptures R&B RapSci-Fi Action Informática II. Facultad de Ingeniería. Universidad de Antioquia

17  Object  Class  Attributes  Operation  Interface (Polymorphism)  Components  Package  Subsystem  Relationships Informática II. Facultad de Ingeniería. Universidad de Antioquia

18  Informally, an object represents an entity, either physical, conceptual, or software  Physical entity  Conceptual entity  Software entity truck Chemical Process Linked List Data Structure Informática II. Facultad de Ingeniería. Universidad de Antioquia

19

20  An object is a concept, abstraction, or thing with sharp boundaries and meaning for an application  An object is something that has  State  Behavior  Identity Informática II. Facultad de Ingeniería. Universidad de Antioquia

21  The state of an object is one of the possible conditions in which an object may exist  The state of an object normally changes over time  Represented by: Attribute values + Links (relationship instances) Y.Welikala Name: Employee ID: Date hired: Status: Y.Welikala Oct 18, 2004 Teaching Informática II. Facultad de Ingeniería. Universidad de Antioquia

22  Behavior determines how an object acts and reacts to requests from other objects  Behavior is represented by the set of messages it can respond to (the operations the object can perform) Registration System Assign Y.Welikala (Returns: confirmation) CS 201 Course Informática II. Facultad de Ingeniería. Universidad de Antioquia

23  Each object has a unique identity, even if its state is identical to that of another object Y. Welikala Teaches OOP “Y.Welikala” Teaches OOP Informática II. Facultad de Ingeniería. Universidad de Antioquia

24  An object is represented as rectangles with underlined names : Lecturer Y.Welikala : Lecturer Class Name Only Class and Object Name Y.Welikala Object Name Only Informática II. Facultad de Ingeniería. Universidad de Antioquia

25 Intro to OO 201 Algebra 110 Electricity 100 Algorithms 202 ThermalDynamics 110 Electronics 110 English 101 Informática II. Facultad de Ingeniería. Universidad de Antioquia

26  A class is a description of a group of objects with common properties (attributes), behavior (operations), relationships, and semantics.  An object is an instance of a class Informática II. Facultad de Ingeniería. Universidad de Antioquia

27  A class is an abstraction in that it:  Emphasizes relevant characteristics  Suppresses other characteristics Informática II. Facultad de Ingeniería. Universidad de Antioquia

28 Class Course Properties Name Location Days offered Credit hours Start time End time Behavior Add a student Delete a student Get course roster Determine if it is full Informática II. Facultad de Ingeniería. Universidad de Antioquia

29  How many class can you see? Informática II. Facultad de Ingeniería. Universidad de Antioquia

30  A class is an abstract definition of an object  It defines the structure and behavior of each object in the class  It serves as a template for creating objects  Objects may be grouped into classes Lecturer Lecturer YohanLecturer ChinthanaLecturer Smith Informática II. Facultad de Ingeniería. Universidad de Antioquia

31 Class Attribute CourseOffering number startTime endTime :CourseOffering Number=CS201 endTime=1230 startTime=1030 Object Attribute Value :CourseOffering Number=CS202 endTime=1500 startTime=1300 Informática II. Facultad de Ingeniería. Universidad de Antioquia

32 CourseOffering addStudent deleteStudent getStartTime getEndTime Class Operation Informática II. Facultad de Ingeniería. Universidad de Antioquia

33  What are the game’s objects?  What do those objects know how to do?  What properties do they have? Informática II. Facultad de Ingeniería. Universidad de Antioquia

34  What are the game’s objects?  piece, board  Capabilities: What do those objects know how to do?  piece: ▪ be created ▪ fall ▪ rotate ▪ stop at collision Informática II. Facultad de Ingeniería. Universidad de Antioquia

35  board: ▪ be created ▪ remove rows ▪ check for end of game  Properties: What attributes and components do they have?  piece: ▪ orientation ▪ Position ▪ shape ▪ color  board: ▪ size ▪ rows Informática II. Facultad de Ingeniería. Universidad de Antioquia


Download ppt "Informática II Prof. Dr. Gustavo Patiño MJ 16- 18 05-09-2013."

Similar presentations


Ads by Google