1 / 20

Objects & Classes

Objects & Classes. 30 September 2010. Analyses and design of a system. Process orientation processes, activities, functions “How?” Data orientation data, entities, objects “What?”. Data aspect. Structure of information Which are the “static” objects?

tara
Download Presentation

Objects & Classes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Objects & Classes 30 September 2010

  2. Analyses and design of a system • Process orientation processes, activities, functions “How?” • Data orientation data, entities, objects “What?”

  3. Data aspect • Structure of information • Which are the “static” objects? • What are the classes of objects? How did they differ? • What are the relationships between them? • Information modeling

  4. Basic concept of information modeling An information system has to represent information about objects (entities) that occurs in the UoD (Universe of Discourse) associated with its application domain. Design domain model  modeling approach Design IS model  data model

  5. Basics data model Data models in IS development • Problem domain : UoD • Store information • Present information • Manipulate information

  6. Data model concepts • Objects are • Physical (tangible) like students, or • Conceptual (intangible) like name things in the real world • Objects have properties • Property of object = attribute + value • Link = connection between objects • Multiple objects are identifiable by a unique identity

  7. File card of Student Name Stud van TUE 24 March 1980 M / F Address Terborg 7, 2745 XY Gieten Tel 06 23840692 DateFinishedCourses 21/02/2002 7m063 24/03/2005 7m822

  8. Objects and links 1 • We can not store real-world objects only information about them • Information objects represent the corresponding real-world object • The properties of an object are represented by the attributes of the corresponding information objects • At any time an (information) object has a certain state consisting of the current values of its attributes • The state of an object can be depicted by means of an object diagram

  9. Stud van TUE: Student Name = Stud van TUE Gender = M DateOfBirth = 24-03-1980 Address = Terborg 7, 2745XY Gieten Elsa van UvT: Student Name = Elsa van UvT Gender = V DateOfBirth = 07-04-1982 Address = As 17, 5623TW Waalre Objects diagram

  10. 877: Student Name = Stud van TUE Gender = M DateOfBirth = 24-03-1980 Address = Terborg 7, 2745XY Gieten 1221: Student Name = Elsa van UvT Gender = F DateOfBirth = 07-04-1982 Address = As 17, 5623TW Waalre Objects diagram Students with identification numbers

  11. has 877: Student 2002022101: Course IsMarriedTo Bas: Person Louise: Person Objects and links 2

  12. Classes • A class is an abstract concept • Each object is an instance of a class • A class has attributes with no values • Classes classify objects • Object analysis  than values to attributes

  13. Class diagram • Object diagrams reveal both the structure and the state of objects • In an information model, we are interested in the structure of objects and not specific in their state • Classes of objects and their relationships with each other are described in a class diagram

  14. Student Name Gender DateOfBirth Address Student StudentNo Name Gender DateOfBirth Address Class diagram 2

  15. Rectangle R1: Rectangle length : int width : int length =25 width = 10 Question ? Describe the class Rectangle and describe an instance of this class

  16. has finished Student Course role name Husband association Person IsMarriedTo Wife association name Class and Associations (relations)

  17. employee employer Person Company works for employee employer Person Company  has employment for Association Adornments: Name, Role • The association has a name - the descriptive term, often a verb, for the association. • Each association has two association ends; each end is attached to one of the classes in the association. An end can be explicitly named with a label. This label is called a role name (association ends are often called roles).

  18. transports Car Person passenger transports 5 Car Person passenger transports * Car Person passenger transports 1..* Car Person passenger transports 2..5 Car Person passenger Association: Multiplicity Multiplicity defines the number of objects associated with an instance of the association. • Default of 1 (1: 1) • 0 or 1: 0..1 • Zero or more (0..infinite): * • 1 or more (1..infinite): 1..* • n..m; range from n to m inclusive

  19. Student StudentNo : Int(8) Name : Char(15) Gender : Char(1) DateOfBirth : Date Address : Char(125) Object class and their data types

  20. References • Sommerville, Ian (2001) Software Engineering, 6th edition http://www.software-engin.com • Timothy Lethbridge & Robert Laganière (2005) Object-Oriented Software Engineering, 2nd edition http://www.lloseng.com

More Related