Bachelor of Information Technology Systems Analysis Design IT
Bachelor of Information Technology Systems Analysis & Design IT 2405 5. Modeling Methods 5. 4 Object Modeling – Part 2 Nisansala Dharmasena Bertholameuse BSc Special (Hons) in IT, PGD in IT, MSc in IT, PGD in IR, Dip in Journalism, M. Phil. in Computer Science (Reading)
IT 2405 Systems Analysis & Design Intended Learning Outcomes After completing this module students should be able to; Understand the concepts of Object Modeling
IT 2405 Systems Analysis & Design Outline Objects Classes Objet diagrams Instant diagrams Notations Aggregation Generalization
IT 2405 Systems Analysis & Design Objects Define objects as a concept, abstraction or thing with purposeful meaning. Two purpose of objects. Promote understanding of the real world Provide a practical basis for computer implementation. All objects have identity and are distinguishable.
IT 2405 Systems Analysis & Design Classes An object class describes a group of objects with similar properties (attributes), common behavior (operations), common relationships to other objects and common semantics. Object of a class share a common semantic purpose It provides a formal graphic notation for modeling objects, classes and their relationships to one another.
IT 2405 Systems Analysis & Design Object diagram It provides a formal graphic notation for modeling objects, classes and their relationships to one another. They are useful for both abstract modeling and designing actual program. Types. Class diagram Instance diagram
IT 2405 Systems Analysis & Design Class diagram A class diagram is a schema, pattern or templates for describing many possible instances of data. Describes classes. Person Class Diagram
IT 2405 Systems Analysis & Design Instance diagram Describes how a particular set of objects relate to each other. Describes objects (Person) Ram (Person) Jai Instance Diagram (Person)
IT 2405 Systems Analysis & Design Attribute An attribute is a data value held by the objects in a class. Each attribute name is unique within a class. An attribute should be a pure data value, not an object. Attributes are listed in the second part of the class box. Each attribute name may followed by optional details, such as type and default type. The type is preceded by a colon.
IT 2405 Systems Analysis & Design Object Modeling Notations Person Attributes name: string age: integer Class with Attributes (Person) Ram 24 Objects with Values (Person) Jai 34
IT 2405 Systems Analysis & Design Operations and Methods An operation is a function or transformation that may be applied to or by objects in a class. All objects in a class share the same operations. The same operation may apply to many different classes. Such an operation is polymorphic i. e. the same operation takes on different forms in different classes. A method is the implementation of an operation for a class.
IT 2405 Systems Analysis & Design Operations and Methods Operation are listed in the lower third of the class box. E. g. The file may have an operation Print. Different method could be implemented to print ASCII files, Binary files and print digitized pictures. Person name age File name size change-job change-add print Operations
IT 2405 Systems Analysis & Design Links and Association LINKS Links and associations are the means for establishing relationships among objects and classes. A link is a physical or conceptual connection between objects. A link is an instance of an association. A link shows a relationship between two or more objects.
IT 2405 Systems Analysis & Design Links and Association ASSOCIATION An association describes a group of links with common structure and semantics. All the links in an association connect objects from the same classes. Association and links often appear as verbs in a problem statement. An association describes a set of potential links in the same way that a class describes a set of potential objects.
IT 2405 Systems Analysis & Design Associations are bidirectional. In real, both directions of traversal are equally meaningful and refer to same association. Associations are often implemented in programming languages as pointers from one object to another.
IT 2405 Systems Analysis & Design Notations All connections among classes should be modeled as association. One-to-one association Many-to-many association Ternary association
IT 2405 Systems Analysis & Design Country Name (Country) India (Country) France Has-capital City Name (City) Delhi (City) Paris One-to-One Association and links Class Diagram Instance Diagram
IT 2405 Systems Analysis & Design Line name (Line) L 1 (Line) L 2 (Line) L 3 (Line) L 4 (Line) L 5 Intersects 2+ Point name (Point) P 1 (Point) P 2 Many-to-many Association and links Class Diagram Instance Diagram
IT 2405 Systems Analysis & Design Language Project Person (Project) MIS Class Diagram (Language). Net Instance Diagram (Person) Jai (Project) CAD (Language) C Ternary Association and Links
IT 2405 Systems Analysis & Design Multiplicity It specifies how many instances of one class may relate to a single instance of an associated class. solid ball -> zero or more Hollow ball -> optional (zero or one) Multiplicity depends upon assumptions and how you define the boundaries of a problem.
IT 2405 Systems Analysis & Design Question The method of design encompassing the process of object oriented decomposition and a notation for depicting both logical and physical and as well as static and dynamic models of the system under design is known as: a) Object- Oriented Programming b) Object- Oriented Design c) Object- Oriented Analysis d) None of the mentioned e) All of the mentioned
IT 2405 Systems Analysis & Design Answer The method of design encompassing the process of object oriented decomposition and a notation for depicting both logical and physical and as well as static and dynamic models of the system under design is known as: a) Object- Oriented Programming b) Object- Oriented Design c) Object- Oriented Analysis d) None of the mentioned e) All of the mentioned The definition has two important parts. The former part uses the class and object abstractions to logically structure systems, and the latter uses algorithmic abstractions. The term object oriented design (OOD) is used to refer any method that leads to object oriented decomposition.
IT 2405 Systems Analysis & Design Question A Class consists of which of these abstractions? a) Set of the objects b) Operations c) Attributes d) All of the mentioned e) None of the mentioned
IT 2405 Systems Analysis & Design Answer A Class consists of which of these abstractions? a) Set of the objects b) Operations c) Attributes d) All of the mentioned e) None of the mentioned A class is a abstraction of objects, operations and attributes.
IT 2405 Systems Analysis & Design Link attributes An link attribute is a property of the links in an association. File Accessible By User Access permission /etc/temp /usr/lgn read-write Ram Mohan Shyam Link Attributes for a many-to-many association
IT 2405 Systems Analysis & Design Role Names A role is one end of an association. A binary association has 2 roles, each of which may have a role name. A role name is a name that uniquely identifies one end of an association. Roles often appear as nouns in problem descriptions. Use of role name is optional. Role names are necessary for associations between two objects of the same class.
IT 2405 Systems Analysis & Design person employer employee Works-for Employee Ram Mohan Employer TCS Wipro Role names for an association company
IT 2405 Systems Analysis & Design Ordering If order of objects required Indicated by writing “{ordered}” next to multiplicity dot for the role. window {ordered} Visible-on Ordered sets in an association screen
IT 2405 Systems Analysis & Design Aggregation It is a part-of relationship It has transitivity property i. e. A is part of B and B is part of C then A is part of C. It is anti symmetric i. e. if A is a part of B then B is not a part of A. Aggregation is a special form of association.
IT 2405 Systems Analysis & Design Aggregation document paragraph sentence Aggregation is drawn like Association except that a small diamond indicates the assembly end of the relationship.
IT 2405 Systems Analysis & Design Aggregation It is a form of association in which an aggregate object is made of components. Components are part of aggregate. Aggregate is inherently transitive i. e. an aggregate has parts which may in turn have parts.
IT 2405 Systems Analysis & Design Aggregation vs. Association Aggregation is a special form of association. If two objects are tightly bound by a part-whole relationship, it is an aggregation. If two objects are usually considered as independent even though they may often be linked, it is an association.
IT 2405 Systems Analysis & Design Aggregation vs. Association A company is an aggregation of its divisions which are in turn aggregations of their departments; a company is indirectly an aggregation of departments. A company is not an aggregation of its employees since the company and person are independent objects of equal structure and status.
IT 2405 Systems Analysis & Design Aggregation vs. Association Company Division Work for Person Aggregation and Association Department
IT 2405 Systems Analysis & Design Generalization It is a relationship between base class and sub class. It is “is-a” relationship because each instance of a sub class is an instance of super class as well.
IT 2405 Systems Analysis & Design Aggregation vs. Generalization Aggregation relates instances. Two distinct objects are involved; one of them is a part of the other. Generalization relates classes. Aggregation is often called “a part of” relationship; generalization is often called “a kind-of” or “is-a” relationship. Aggregation is sometimes called an “and relationship” and generalization refers to “or relationship”
IT 2405 Systems Analysis & Design Aggregation vs. Generalization Lamp Base Fluorescent Part 1 Cover Incandescent Part 2 Part 3 Part 4 Aggregation and generalization Switch Wiring
IT 2405 Systems Analysis & Design Recursive aggregation Aggregation can be fixed, variable or recursive. A fixed aggregate has a fixed structure; the number and types of sub parts are predefined e. g. lamp. A variable aggregation has a finite number of levels but number of parts may vary e. g. company. A recursive aggregation contains directly or indirectly an instance of the same kind of aggregate; the number of potential levels is unlimited e. g. computer program.
IT 2405 Systems Analysis & Design Recursive aggregate Program Block Compound statement Simple statement Recursive aggregate
IT 2405 Systems Analysis & Design Question A class is divided into which of these compartments ? a) Name Compartment b) Attribute Compartment c) Operation Compartment d) All of the mentioned e) None of the mentioned
IT 2405 Systems Analysis & Design Answer A class is divided into which of these compartments ? a) Name Compartment b) Attribute Compartment c) Operation Compartment d) All of the mentioned e) None of the mentioned Class is divided into 3 main compartments mentioned.
IT 2405 Systems Analysis & Design Question What is that concept in type theory in which a single name may denote objects of many different classes that are related by some common super class referred to ______ a) Monomorphism b) Type Checking c) Polymorphism d) Generalization e) Encapsulation
IT 2405 Systems Analysis & Design Answer What is that concept in type theory in which a single name may denote objects of many different classes that are related by some common super class referred to ______ a) Monomorphism b) Type Checking c) Polymorphism d) Generalization e) Encapsulation Explanation: Polymorphism is a feature of object oriented programming that usually takes the ability of creating an object, or variable, or a function in more than one form. Polymorphism exists when the features of inheritance and dynamic binding interact.
IT 2405 Systems Analysis & Design Lesson Summary • Understand the concepts of Object Modeling
IT 2405 Systems Analysis & Design
Bachelor of Information Technology Systems Analysis & Design IT 2405 5. Modeling Methods 5. 4 Object Modeling – Part 2 Nisansala Dharmasena Bertholameuse BSc Special (Hons) in IT, PGD in IT, MSc in IT, PGD in IR, Dip in Journalism, M. Phil. in Computer Science (Reading)
- Slides: 47