CS 501: Software Engineering Fall 1999

Slides:



Advertisements
Similar presentations
Software Engineering-II Sir Zubair Sajid. 3 Data Flow Diagrams (DFD)  DFDs describe the flow of data or information into and out of a system what does.
Advertisements

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
CIS224 Software Projects: Software Engineering and Research Methods
Use Case - Example University library system requirements
CS CS 5150 Software Engineering Lecture 15 Object Oriented Design 1.
1 CS 501 Spring 2007 CS 501: Software Engineering Lecture 16 Object Oriented Design 2.
1 CS 501 Spring 2003 CS 501: Software Engineering Lecture 18 Object Oriented Design II.
1 CS 501 Spring 2005 CS 501: Software Engineering Lecture 15 Object Oriented Design 1.
Principles of Object-Oriented Software Development The language Java.
1 CS 501 Spring 2008 CS 501: Software Engineering Lecture 16 Object Oriented Design 2.
CS 501: Software Engineering Fall 2000 Lecture 11 Object-Oriented Design I.
CS CS 5150 Software Engineering Lecture 15 Object Oriented Design 1.
Software Engineering Lecture 9 Object-Oriented Design II.
1 CS 501 Spring 2008 CS 501: Software Engineering Lectures 15 Object Oriented Design 1.
CS 501: Software Engineering Fall 2000 Lecture 13 Object-Oriented Design III.
CS 501: Software Engineering Fall 2000 Lecture 12 Object-Oriented Design II.
CSCI 639 Topics in Software Engineering Assignment #4 Fall 2006.
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.
CS CS 5150 Software Engineering Lecture 16 Object Oriented Design 2.
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 16 Object Oriented Design I.
Software Engineering Case Study Slide 1 Introductory case study.
Use Case Diagram : Library System
CS 5150 Software Engineering Lecture 15 Program Design 2.
Software Engineering COSC 4460 Spring 2002 Hello, world!
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.
CS2110: SW Development Methods Design of methods (functions) Class design – CRC cards – UML class and sequence diagrams Software Design.
Things and Relations - Examples Things Relationships Structural Behavioral Grouping Annotational Dependency Association Generalization Realization Class,
CS 501: Software Engineering Fall 1999 Lecture 18 (a) Project Reports (b) Object-Oriented Design III.
CS 360 Lecture 6.  A model is a simplification of reality  We build models to better understand the system being developed.  We build models of complex.
Recap (önemli noktaları yinelemek) from last week Paradigm Kay’s Description Intro to Objects Messages / Interconnections Information Hiding Classes Inheritance.
CS CS 5150 Software Engineering Lecture 17 Object Oriented Design 3.
Presented by: CHAN LAI SAN ( ) REBAH DAW SARREB ( ) FIDA AL-OBAISI ( ) 08 April 2008 (Tuesday 6pm – 7:30pm)
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Rob and Coronel Adapted for INFS-3200.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Java Applets. 2 Introduction to Java Applet Programs  Applications are stand alone programs executed with Java interpreter executed with Java interpreter.
MIS541AUniversity of Arizona Lecture 13 Object-Oriented Analysis -II.
1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 17 Object Oriented Design 3.
Jan 21, Ron McFadyen1 Ch 10. Domain Model: Visualizing Concepts Domain model illustrated with a class diagram (with no operations defined)
CS CS 5150 Software Engineering Lecture 15 Program Design 1.
Java Applets. 2 Introduction to Java Applet Programs Applications are ___________________ programs –executed with Java interpreter Applet is a small program.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Software Engineering Lecture 10 UML vs. ERD.
Applets Yong Choi School of Business CSU, Bakersfield.
Ch- 8. Class Diagrams Class diagrams are the most common diagram found in modeling object- oriented systems. Class diagrams are important not only for.
Software Engineering Lecture 8 Object-Oriented Analysis.
Class Diagram Mehwish Shafiq. Class Collection of object that share common properties, attributes, and behavior. Collection of objects with same data.
1 CS 501 Spring 2003 CS 501: Software Engineering Lecture 17 Object Oriented Design I.
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 17 Object Oriented Design II.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
CS 501: Software Engineering Fall 1999 Lecture 15 Object-Oriented Design I.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
Software Design Models UML
Chapter 4: Business Process and Functional Modeling, continued
Data Flow Diagrams.
Object-Oriented Analysis and Design
Chapter 11 Object-Oriented Design
Unified Modeling Language
Introduction to Unified Modeling Language (UML)
Data Flow Diagrams.
Start at 17th March 2012 end at 31th March 2012
CS 501: Software Engineering
The Process of Object Modeling
CS 501: Software Engineering
Java Applets.
Copyright 2007 Oxford Consulting, Ltd
Analysis and Design with UML: Classes and Relationships
Visual Modeling Using Rational Rose
Object-Oriented Software Engineering
Lecture 8 Object Concepts
CS 501: Software Engineering
Presentation transcript:

CS 501: Software Engineering Fall 1999 Lecture 17 Object-Oriented Design II

Administration  Recitation session: Rational Rose  Submission of Assignment 4

The "Hello, World" Example import java.awt.Graphics; class HelloWorld extends java.applet.Applet { public void paint (Graphics g) { g.drawString ("Hello, World!", 0, 10); } Example from: BJR

Abstraction for HelloWorld class HelloWorld paint() name annotation g.drawString ("HelloWorld", 0, 10)" operations

Class Diagram Applet Note that the Applet and Graphics classes are shown elided. generalization HelloWorld paint() dependency Graphics

Class Inheritance Diagram Object Panel interface Component ImageObserver Applet Container HelloWorld

Packaging Classes java applet HelloWorld package awt Graphics lang

Notation for Classes and Objects AnyClass attribute1 attribute2 operation1() operation2() anObject:AnyClass or :AnyClass or anObject or AnyClass The names of objects are underlined.

Sequence Diagram:Painting Mechanism :Thread :Toolkit :ComponentPeer target:HelloWorld run run callbackLoop handleExpose paint

Component Diagram executable component hello.java hello.hml HelloWorld.class hello.jpg

Modeling Classes Given a real-life system, how do you decide what classes to use?  What terms do the users and implementers use to describe the system? They are candidates for classes.  Is each candidate class crisply defined?  For each class, what is its set of responsibilities? Are the responsibilities evenly balanced among the classes?  What attributes and operations does each class need to carry out its responsibilities?

Noun Identification: A Library Example The library contains books and journals. It may have several copies of a given book. Some of the books are reserved for short-term loans only. All others may be borrowed by any library member for three weeks. Members of the library can normally borrow up to six items at a time, but members of staff may borrow up to 12 items at one time. Only members of staff may borrow journals. The system must keep track of when books and journals are borrowed and returned and enforce the rules.

Candidate Classes Library the name of the system Book Journal Copy ShortTermLoan event LibraryMember Week measure MemberOfLibrary repeat Item book or journal Time abstract term MemberOfStaff System general term Rule general term

Relations between Classes Book is an Item Journal is an Item Copy is a copy of a Book LibraryMember Item MemberOfStaff is a LibraryMember Is Item needed?

Operations LibraryMember borrows Copy LibraryMember returns Copy MemberOfStaff borrows Journal MemberOfStaff returns Journal Item appears not to be needed.

Class Diagram MemberOfStaff LibraryMember 1 1 on loan on loan 0..* 0..12 Journal Copy is a copy of 1..* 1 Book

Rough Sketch: Wholesale System A wholesale merchant supplies retail stores from stocks of goods in a warehouse. What classes would you use to model this business?

Rough Sketch: Wholesale System RetailStore Order Merchant Product Warehouse Shipment Invoice

Rough Sketch: Wholesale System Merchant RetailStore name address contactInfo financialInfo Shipment Responsibilities -track status of shipped products Warehouse Order Product responsibility (text field) Reversals damaged() return() wrongItem() Invoice

Expanding a Class: Modeling Financial Information RetailStore association 1 * Transaction Which class is responsible for the financial records for a store? Payment Invoice

Modeling Invoice Shipment ??? RetailStore invoiceRecord goodsShipped invoiceNumber +goodsShipped() -sendInvoice() PartsList adornments + public - private

Lessons Learned Design is empirical. There is no single correct design. During the design process:  Eliding: Elements are hidden to simplify the diagram  Incomplete: Elements may be missing.  Inconsistency: The model may not be consistent The diagram is not the whole design. Diagrams must be backed up with specifications.

Levels of Abstraction The complexity of a model depends on its level of abstraction:  High-levels of abstraction show the overall system.  Low-levels of abstraction are needed for implementation. Two approaches:  Model entire system at same level of abstraction, but present diagrams with different levels of detail.  Model parts of system at different levels of abstraction.