Ch4: Software Architecture and Design. 1 Object-oriented paradigm  Object-oriented decomposition:  Agents comprised of two parts:  Hidden implementation:

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
Use Case & Use Case Diagram
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Introduzione ai casi d’uso  Adriano Comai 1999 Pag. 1 Use Cases: an Introduction  Adriano Comai 1999.
Object-Oriented Analysis and Design
CT1404 Lecture 2 Requirement Engineering and Use Cases 1.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
Slide 1 Chapter 7 Structural Modeling. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
7. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Detailed Object-Oriented Requirements Definitions  System Processes—A Use.
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 More on use cases System sequence.
Ch4: Software Architecture and Design. 1 How to choose objects and classes  The first and most often raised concern for newcomers to OO concepts  Typical.
C++ fundamentals.
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
1 Object-Oriented Software Engineering CIS 375 Bruce R. Maxim UM-Dearborn.
Designing Classes OO Software Design and Construction Computer Science Dept Va Tech January 2002 ©2002 McQuain WD & Keller BJ 1 Designing the Classes Once.
Object Orientation An Object oriented approach views systems and programs as a collection of interacting objects. An object is a thing in a computer system.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented.
What is a domain model? “A domain model captures the most important types of objects in the context of the business. The domain model represents the ‘things’
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 20. Review Software Requirements Requirements Engineering Process.
Slide 1 Structural Modeling Chapter 7. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
Systems Analysis and Design in a Changing World, 3rd Edition
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Conceptual Modeling Modeling the Problem Domain. Conceptual Modeling Decompose problem space into comprehensible concepts. Clarify the terminology or.
UML-1 3. Capturing Requirements and Use Case Model.
UML Use Case Diagramming Guidelines. What is UML? The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing,
Chapter 8 Analysis & Modeling. Data Modeling examines data objects independently of processing focuses attention on the data domain creates a model at.
Requirements Engineering Methods for Requirements Engineering Lecture-30.
Data Structures Using C++ 2E1 Inheritance An “is-a” relationship –Example: “every employee is a person” Allows new class creation from existing classes.
SYS466: Analysis and Design Using OO Models Domain Class Diagram.
Design.ppt1 Top-down designs: 1. Define the Problem IPO 2. Identify tasks, Modularize 3. Use structure chart 4. Pseudocode for Mainline 5. Construct pseudocode.
1 What is OO Design? OO Design is a process of invention, where developers create the abstractions necessary to meet the system’s requirements OO Design.
Kal Bugrara, Ph.DSoftware Engineering Northeastern University Fundamentals Of Software Engineering Lecture V.
Design Model Lecture p6 T120B pavasario sem.
Data Abstaraction Chapter 10.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Learners Support Publications Object Oriented Programming.
CSC 131 Fall 2006 Lecture # 6 Object-Oriented Concepts.
Abstraction ADTs, Information Hiding and Encapsulation.
C++ Inheritance Data Structures & OO Development I 1 Computer Science Dept Va Tech June 2007 © McQuain Generalization versus Abstraction Abstraction:simplify.
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
Chapter 1 Data Abstraction: The Walls CS Data Structures Mehmet H Gunes Modified from authors’ slides.
Object Oriented Programming. OOP  The fundamental idea behind object-oriented programming is:  The real world consists of objects. Computer programs.
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
Identification of Classes. Object Oriented Analysis (OOA) OOA is process by which we identify classes that play role in achieving system goals & requirements.
Elements Of Modeling. 1.Data Modeling  Data modeling answers a set of specific questions that are relevant to any data processing application. e.g. ◦
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
Using Use Case Diagrams
Software Engineering Lecture 4 System Modeling The Analysis Stage.
UNIT 1.
Object-Oriented Analysis and Design
Chapter 1 Data Abstraction: The Walls
Object Oriented Concepts -I
OO Domain Modeling With UML Class Diagrams and CRC Cards
OO Domain Modeling With UML Class Diagrams and CRC Cards
Database Fundamentals
System models October 5, 2005.
SAD ::: Spring 2018 Sabbir Muhammad Saleh
Using Use Case Diagrams
Copyright 2007 Oxford Consulting, Ltd
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Chapter 11: Inheritance and Composition
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Chapter 20 Object-Oriented Concepts and Principles
Presentation transcript:

Ch4: Software Architecture and Design

1 Object-oriented paradigm  Object-oriented decomposition:  Agents comprised of two parts:  Hidden implementation:  Public interface:  An Agent can only be modified by operations defined in either the hidden implementation or public interface.

2 Core object oriented concepts  Class  Information:  Method  Object  Message

3 Class class name attributes: operations: external entities things occurrences roles organizational units places structures A class is a generalized description of a collection of similar objects. Object is an instance of a class. Class exports: -Operations used to manipulate instances -May export attributes.

4 Two representations of a class

5 Operations (or methods or services) An executable procedure that is a part of a class and operates on the data attributes defined as part of the class. A method operates on all instances of a class A method is invoked via message passing.

6 Messages Messages - the means by which objects invoke each other’s methods.

7 An example Employee class Class Employee { } //Hidden Implementation Private: //Instance Vars char[30] name; float salary; //Public Interface Public: void print_name(); void print_salary(); void update_salary(float i); Employee(char *n, float s); Main() { //Declare Objects Employee emp1(A,100.0); Employee emp2(B,120.0); //Pass Messages //Invoke Methods emp1.print_name(); emp1.print_salary(); emp2.update_salary(10); emp2.print_name(); emp2.print_salary(); } What’s Output of Main()? A B Conclusion: Each Object (emp1,emp2) has Own Independent State that is Accessible via Shared Public Interface of Class

8 Classes vs. ADTs  Classes extend ADTs as follows:  Message passing:  Inheritance:  Polymorphism:  ADT/OO benefits:

9 How to choose objects and classes  The first and most often raised concern for newcomers to OO concepts  Typical answers:  Better answer:

10 How to choose objects and classes (contd..)  Employee class  Private data:  Public interface:  Based on an information perspective, focusing on the idea that to track Employees a set of standard data and operations are needed.

11 How to choose objects and classes (contd..)  ATM_log class:  Private data:  Public interface:  Embodies the functions that take place to authenticate an individual to an ATM session.  Even with a functional view, information is needed to capture user input for verifying status.

12 How to choose objects and classes (contd..)  ATM_User:  Private data:  Public interface:  User interface by capturing the different interactions between the ATM and the user.

13 How to choose objects and classes (contd..) An appointments system that will allow telephone callers to book an appointment with a doctor. The caller will specify the day and the time when he wishes to be seen by a doctor.  Tentative classes could be:

14 How to choose classes and objects (contd..)  Redundancy:  Discard nouns outside the system domain  Vagueness:  Attributes:

15 How to choose classes and objects (contd..)  Operations:

16 How to choose objects and classes (contd..)  Attributes are properties of individual objects  Can be  Nouns followed by “of the” (E.g. day “of the” appointment)  Adjectives - color, number, state (on/off)  May not be fully described  Guidelines for identifying attributes:  Attributes that are directly relevant to the problem. Something can be an attribute in one context and an object in another e.g city.  Give them meaningful names.  Avoid attributes that are purely involved in implementation e.g an id number that is generated by the machine and has meaning only within the application.  Avoid attributes that can be derived from existing information e.g. age can be derived from date of birth  Different and unrelated attributes in a class may suggest that the class is a composite of a number of classes. Useful to divide such a class into a number of separate classes.

17 How to choose objects and classes (contd..)  Identifying operations:  Attributes:  Events in the scenarios:  A scenario consists of interactions (events exchanged) that have to take place among the objects to achieve the functionality.  Identify common and rare scenarios.  Events passed to and from the objects implies operation on the object or message from it.

18 How to choose objects and data (contd..)  Real world can also suggest the operations needed to support a class :  Operations should not overlap each other:  Number of operations that have access to the data should be reduced to a minimum.  Operations may refer to verbs in the problem description

19 High-Tech Supermarket System (HTSS)  Automate the functions and actions:  Cashiers and inventory updates  User friendly grocery item locator  Fast-track deli orderer  Inventory control  User system interfaces  Cash register/UPC scanner  GUI for inventory control  Shopper interfaces locator and orderer  Deli interface for deli workers

20 HTSS (contd..) IC IC CR CR CR CR IL IL IL SDO SDOEDO EDO Order Payment Item ItemDBLocalServer Non-Local Client Int. InventoryControl ItemDBGlobalServerOrderDB SupplierDB CreditCardDB ATM-BanKDB IL: Item Locator CR: Cash Register IC: Invent. Control DO: Deli Orderer for Shopper/Employee Shopper/Employee

21 Classes in the HTSS  Nouns:  Noun extraction:  Do we need classes for customers/shoppers?  Nouns such as aisle, shelf, UPC, etc. do not have any independent existence, in fact, they represent attributes of item.

22 Classes in HTSS  A class based on knowledge of the problem domain:  Receipt  There are other kinds of classes, mostly in the solution domain (do not represent any physical entity or a concept in the problem domain), that noun extraction does not reveal.  Classes to represent GUIs.  Collection classes such as linked lists, queues, stacks  Attributes based on domain knowledge:  Retail cost, whole sale cost, etc.

23 Item class in HTSS  Item class  Attributes:  Operations: