Object Oriented Software Development 2009-2010 Modelling information systems OOSAD Booklet Chapter 4 Lecture: Week 3 Brian Farrimond.

Slides:



Advertisements
Similar presentations
Banking Business Scenario
Advertisements

CIS224 Software Projects: Software Engineering and Research Methods
7M822 UML Class Diagrams 7 October 2010.
1 CIS224 Software Projects: Software Engineering and Research Methods Lecture 4 Class Models (Based on Fowler (2004, Chapters 3 & 5) and Stevens and Pooley.
Text-Book Chapters (7 and 8) Entity-Relationship Model
Use Case - Example University library system requirements
Lecture 9 Object-Oriented Analysis
Jan 16, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration 1: a simple cash-only success scenario of Process Sale.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Conceptual Design Lecture 3 Database Development.
Requirements Analysis 1 Use Cases -> Class Diagrams Moving from the user towards the system.
Object Classes In UML. Object Concepts What is an object? How do objects communicate? How is an object’s interface defined? What have objects to do with.
Lecture 4 Class Responsibility Collaboration Cards
Object Oriented Software Development Class diagrams: Towards implementation OOSAD Booklet Chapter 4 Seminar: Week 4 Brian Farrimond.
Object Oriented Software Development Modelling information systems OOSAD Booklet Chapter 3 Lecture: Week 2 Brian Farrimond.
Copyright © 2003 Addison-Wesley Your name here. Copyright © 2003 Addison-Wesley Data Modeling with ER Diagrams What is an Entity-Relationship Model? How.
Software Engineering Lecture 9 Object-Oriented Design II.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
Chapter 2: Entity-Relationship Model (Continued)
Object Oriented Software Development Modelling business objects OOSAD Booklet Chapter 4 Lecture: Week 4 Brian Farrimond.
Introductory case study. 2 The problem The most difficult part of any design project is understanding the task you are attempting You have been contacted.
Software Engineering Case Study Slide 1 Introductory case study.
Use Case Diagram : Library System
Chapter 3 Object-Oriented Analysis of Library Management System(LMS)
Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”
Object-oriented methodology object models use case modeling unified modeling language the data dictionary the cornucopia case portfolio project Systems.
Data Modeling with ER Diagrams What is an Entity-Relationship Model? How is an E-R model represented as an E-R diagram? How can a video store be modeled.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 2: Modelling.
From Problem Statement to Design
Systems Analysis and Design in a Changing World, Fifth Edition
CS2110: SW Development Methods Design of methods (functions) Class design – CRC cards – UML class and sequence diagrams Software Design.
Use Cases 2 ENGR ♯10 Peter Andreae
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
OBJECT AND CLASES: THE BASIC CONCEPTS Pertemuan 8 Matakuliah: Konsep object-oriented Tahun: 2009.
Copyright © 2003 Addison-Wesley Jesper Rosholm Tørresø.
Data Modelling – ERD Entity Relationship Diagram’s Entity Relationship Diagrams and how to create them. 1.
Intro to UML - OO Class Diagrams Week 5 CMIS570. Plan for Tonight Object terms Unified Modeling Language history Class Diagrams Intro to Oracle Oracle.
1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of.
CSC 213 – Large Scale Programming. Today’s Goal  Improve design skills to make usable designs  Noun extraction & UML class diagram reviewed  Connections.
1COM6030 Systems Analysis and Design © University of Sheffield 2005 COM 6030 Software Analysis and Design Lecture 9 – More on objects and classes Dr Richard.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
MCS 270 Spring 2014 Object-Oriented Software Development.
Jan 21, Ron McFadyen1 Ch 10. Domain Model: Visualizing Concepts Domain model illustrated with a class diagram (with no operations defined)
CS3773 Software Engineering Lecture 04 UML Class Diagram.
1. Objectives At the end of this chapter you should be able to:  Discuss the use and features of a data model  Define the terms entity and attribute.
Entity-Relationship (ER) Modelling ER modelling - Identify entities - Identify relationships - Construct ER diagram - Collect attributes for entities &
Chapter 9 Applying UML and Patterns -Craig Larman
5 Systems Analysis and Design in a Changing World, Fifth Edition.
ERD ( Conceptual data model From the statement of data requirements a conceptual data model is produced. This describes.
ICOM 5016 – Introduction to Database Systems Lecture 5 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
 Week08.  Review Schedule Weeks 8-14  This week o Review last class o Introduce Class Diagrams o ICE-03 Sheridan SYST Engineering Quality Systems.
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
Domain Classes – Part 1.  Analyze Requirements as per Use Case Model  Domain Model (Conceptual Class Diagram)  Interaction (Sequence) Diagrams  System.
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj ER Model Lecture 2 © Akhilesh Bajaj, 2000, 2002, 2003, 2004,
Class Diagram Mehwish Shafiq. Class Collection of object that share common properties, attributes, and behavior. Collection of objects with same data.
Larman chapter 101 Domain Model: Visualizing concepts Larman chapter 10.
Systems Analysis & Design
Microsoft Access 2010 Chapter 11 Database Design.
1 M206 Chapter 31: An Overview of Software Development 1.Defining the problem 2.Analyzing the requirement – constructing initial structural model 3.Analyzing.
1 Chapter 13: Class Diagram Chapter 19 in Applying UML and Patterns Book.
Contents Design Process Modeling Constraints E-R Diagram Design Issues
Object-Orientated Analysis, Design and Programming
Classes and their relationships
Place a hold on a checked out item
Chapter 8 Analysis & Modeling
Start at 17th March 2012 end at 31th March 2012
Place a hold on a checked out item
Object Oriented System Design Class Diagrams
Lecture 8 Object Concepts
Presentation transcript:

Object Oriented Software Development Modelling information systems OOSAD Booklet Chapter 4 Lecture: Week 3 Brian Farrimond

2 Objectives At the end of this week you should: Be able to identify Classes and correctly represent them on a Class Diagram. Be able to identify attributes and distinguish them from Classes Be able to use StarUML to draw class- association diagrams

3 Testlet True or False 1. Associations show Generalization relationships 2. Associations are relationships between Objects 3. Associations are relationships between Classes 4. The Class-Association diagram shows messages paths. 5. The Class-Association diagram shows all the objects in a system. 6. The identity of an object is uniquely defined by the values of its attributes. 7. The state of an object is uniquely defined by the values of its attributes.

4 Testlet True or False 1. Associations show Generalization relationships NO 2. Associations are relationships between Objects NO 3. Associations are relationships between Classes YES 4. The Class-Association diagram shows messages paths. YES 5. The Class-Association diagram shows all the objects in a system NO 6. The identity of an object is uniquely defined by the values of its attributes. NO 7. The state of an object is uniquely defined by the values of its attributes. YES

5 A Class-Association Diagram

6 Identifying Classes..... A class can represent a real-world thing, (e.g. A Car) A role (e.g. A member) An Event / Interaction (e.g. A meeting)

7 Identifying Classes A good way to start is to underline nouns or noun-phrases in the problem statement (System requirement specification) Noun: “A word that refers to a person, place or thing” Noun-Phrase: A group of words that act like a noun. Eg a Dentist appointment

8 Exercise: identify potential classes A library contains publications, which are books or journals. A library member may borrow up to six items at any one time. Journals cannot be borrowed. The System must keep track of borrowers and Publications that they have borrowed. The library may hold several copies of any particular book. A copy is identified by a unique accession number

9 Exercise: identify potential classes A library contains publications, which are books or journals. A library member may borrow up to six items at any one time. Journals cannot be borrowed. The System must keep track of borrowers and Publications that they have borrowed. The library may hold several copies of any particular book. A copy is identified by a unique accession number

10 Potential Classes – which should we keep? LibraryBook JournalLibrary member ItemOne Time SystemBorrower PublicationCopy (of book) Accession Number

11 Rejecting candidates Redundancy Duplicate names for same thing. Names for the system itself, or outside the system Vague nouns – unclear of meaning Attributes of another class Meta-language Language about requirements etc

12 Key Question Does the Class Record Data (i.e. have any attributes? No data => No Class

13 Refined list of classes LibraryReject – system itself BookOk JournalOkLibrary memberOk ItemDuplicate name for Copy of Book One TimeVague SystemMeta languageBorrowerDuplicate (Member) PublicationPossibly superclass Copy (of book) Possible, but may be considered as instance of Book Accession Number Attribute of Book

14 Class Diagram.. assuming no Copy class Member Publication JournalBook Add Associations, Multiplicities and Generalisation s

15 Exercise: identify associations A library contains publications, which are books or journals. A library member may borrow up to six items at any one time. Journals cannot be borrowed. The System must keep track of borrowers and Publications that they have borrowed. The library may hold several copies of any particular book. A copy is identified by a unique accession number

16 Exercise: identify associations A library contains publications, which are books or journals. A library member may borrow up to six items at any one time. Journals cannot be borrowed. The System must keep track of borrowers and Publications that they have borrowed. The library may hold several copies of any particular book. A copy is identified by a unique accession number

17 Associations & Generalisations A Member can borrow up to six Books. A Book is borrowed by 1 Member Generalisations A Book is-a-kind-of Publication A Journal is-a-kind-of Publication

18 Class Diagram Member Publication JournalBook borrows

19 Class Diagram.. assuming there is a Copy class Member Publication JournalBook Add Associations, Multiplicities and Generalisation s Copy

20 Class Diagram with Copy class Member Publication JournalBook borrows Copy is a copy of 1 1..*

21 A Warning…… 1.Suppose a problem statement includes: "The Member makes a reservation for a Book". What are the classes? MemberBookReservation makes for

22 A Warning…… 1.However, Suppose it was phrased as: " A Member reserves a Book"? What are the classes? Do these mean the same thing? Member Book reserves

23 Member Book reserves MemberBookReservation makes for Which is correct?

24 Exercise: Identify the classes The Bank of Hope offers a number of types of account to its customers. Student Accounts have free overdrafts up to a limit that depends on their year of study, but do not pay interest. Current Accounts pay interest at 3%, but there are no free overdrafts. A Customer can hold any number of Current Accounts, but only those who are studying at University can have a Student account. No-one can have more than one Student Account. A Student Account can only be held by one person.

25 Exercise: Identify the classes The Bank of Hope offers a number of types of account to its customers. Student Accounts have free overdrafts up to a limit that depends on their year of study, but do not pay interest. Current Accounts pay interest at 3%, but there are no free overdrafts. A Customer can hold any number of Current Accounts, but only those who are studying at University can have a Student account. No-one can have more than one Student Account. A Student Account can only be held by one person.

26 Refined List: Account(Generalisation) Student Account Current Account Customer (Generalisation) Student

27

28 Summary Class Diagram models show system structure (Static model) Classes model Things, Events, roles Identify nouns as candidate Check if they record data