Presentation is loading. Please wait.

Presentation is loading. Please wait.

3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 1 February 20, 2004 Lecture 3: Introduction to Software Analysis and.

Similar presentations


Presentation on theme: "3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 1 February 20, 2004 Lecture 3: Introduction to Software Analysis and."— Presentation transcript:

1 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 1 February 20, 2004 Lecture 3: Introduction to Software Analysis and Design - Object-Oriented Notions Prof. Kazimierz Subieta Polish-Japanese Institute of Information Technology Institute of Computer Science, Warsaw, Poland subieta@ipipan.waw.pl http://www.ipipan.waw.pl/~subieta System Engineering and Databases

2 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 2 February 20, 2004 Content Acknowledgment: The material has been compiled from many Internet sources. It has no commercial purpose. Special thanks to anonymous authors of the Rational Software Corporation, who are the original authors of many of the presented slides.  Basic Principles of Object Orientation: Abstraction, Encapsulation, Modularity, Hierarchy  Basic Concepts of Object Orientation: Object, Class, Attribute, Operation, Component, Generalization, Association, Polymorphism  Strengths of Object Orientation  What is Class Diagram?  Object-oriented methodologies  Conceptual modelling  Notations in Analysis and Design

3 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 3 February 20, 2004 Objectives: Introduction to Object Orientation Understand the basic principles of object orientation Define the basic concepts and terms of object orientation Discuss the strengths of object orientation Understand some basic UML modeling mechanisms

4 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 4 February 20, 2004 Basic Principles of Object Orientation Object Orientation EncapsulationAbstraction Hierarchy Modularity

5 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 5 February 20, 2004 What is Abstraction? CustomerSalespersonProduct

6 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 6 February 20, 2004 What is Encapsulation? Hide implementation from clients –Clients depend on interface

7 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 7 February 20, 2004 What is Modularity? The breaking up of something complex into manageable pieces Order Processing System BillingOrder Entry Order Fulfillment

8 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 8 February 20, 2004 What is Hierarchy? Decreasing abstraction Increasing abstraction Asset RealEstate Savings BankAccount CheckingStock Security Bond Classes at the same level of the hierarchy should be at the same level of abstraction Levels of abstraction

9 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 9 February 20, 2004 Basic Concepts of Object Orientation Object Class Attribute Operation Component Generalization Association Polymorphism

10 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 10 February 20, 2004 What is an Object? Behavior State Unique identity English 101Geology 110 World History 200Algebra 110Music History 200Intro to OO 180

11 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 11 February 20, 2004 What is a Class? An object is defined by a class English 101Geology 110 World History 200Algebra 110Music History 200Intro to OO 180 CourseOffering

12 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 12 February 20, 2004 What is an Attribute? :CourseOffering number = 101 startTime = 900 endTime = 1100 :CourseOffering Name = 104 startTime = 1300 endTime = 1500 CourseOffering number startTime endTime Class Attribute Object Attribute Value

13 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 13 February 20, 2004 What is an Operation? CourseOffering addStudent deleteStudent getStartTime getEndTime Class Operation

14 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 14 February 20, 2004 A non-trivial, nearly independent, and replaceable part of a system that fulfills a clear function in the context of a well- defined architecture > Component Name Component Name What Is A Component? Design ModelImplementation Model Component Interface

15 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 15 February 20, 2004 What is Generalization? One class inherits from another Truck tonnage GroundVehicle weight licenseNumber Car owner register( ) getTax( ) Person 0..* Trailer 1 ancestor decendent generalization size

16 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 16 February 20, 2004 What is Association? public class Person { public Company employer; } public class Company { public Vector employee; } Position PersonCompany * 0..1 +employee+employer Association roles Position PersonCompany

17 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 17 February 20, 2004 What is Polymorphism? The ability to hide many different implementations behind a single interface Manufactor A Manufactor C

18 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 18 February 20, 2004 Strengths of Object Orientation A single paradigm –Single language used by users, analysts, designers, implementers Facilitates architectural and code reuse Models more closely reflect the real world –More accurately describe corporate data and processes –Decomposed based on natural partitioning –Easier to understand and maintain Stability –A small change in requirements does not mean massive changes in the system under development

19 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 19 February 20, 2004 Order Product Ship via A Simple Sales Order Example

20 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 20 February 20, 2004 What is Class Diagram? A representation of the types of objects in the system and the various kinds of static relationships that exist among them. It serves as the framework for the system design. Object - an identified, intelligent component of information system capability. Domain objects represent "things" in the world (entities). Capability - behavior that the object can perform, typically requiring variables (data attributes) and methods (procedural code). Class - a collection of objects having the same capabilities. Association - a relationship among objects Subtype Specialization (Subclasses) - subset of a class that extends its capabilities Constraint - a rule defining legal states of objects, classes, relationships, and subtypes.

21 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 21 February 20, 2004 SalespersonProduct Sale Corporate Customer IndividualTruck Vehicle Train Class Diagram for the Sales Example

22 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 22 February 20, 2004 Only the Truck class changes Suppose the requirements for shipping by a truck change... SalespersonProduct Sale Corporate Customer IndividualTruck Vehicle Train Effect of Requirements Change

23 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 23 February 20, 2004 Object-oriented methodologies Object-oriented methodologies employ the concepts of object-orientedness to conceptual modeling and to analysis and design of information systems. The main component of O-O methodologies is an object (class) diagram, which is some notational variant and extension of the popular entity- relationship diagrams. An object diagram represents: classes of objects, attributes of objects, methods that can be applied to objects, inheritance hierarchy among classes, relationships (associations, aggregations) among classes, cardinalities of these relationships, various constraints, and other information. Object diagrams are supported by: dynamic diagrams dealing with events, states and time, method passing diagrams, data flow and functional diagrams, etc. Recent O-O methodologies are driven by use case diagrams, which map the system structure and functionality form the user viewpoint.

24 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 24 February 20, 2004 Conceptual modeling Human perception of the problem (business) domain Abstract conceptual model of the domain Programmer’s view of data structures and operations... mapping The tendency in software modeling tools is simplifying the mappings between these three perspectives.

25 3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 25 February 20, 2004 Notations in Analysis and Design Kinds of notations  A natural language  Graphical notations  Specifications - formalized statements Graphical notations have special meaning. Software engineering follows other technological domains, such as electronics and mechanics. Advantage of graphical notations are confirmed by psychological tests. Functions of notations  Tools for analysis and design, recording ideas and results  Interaction with users of designed systems  Communication with other members of a design team  Basis for implementation of software  Documentation of projects and software


Download ppt "3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 1 February 20, 2004 Lecture 3: Introduction to Software Analysis and."

Similar presentations


Ads by Google