Software Design i206 Fall 2010 John Chuang Some slides adapted from Glenn Brookshear, Brian Hayes, Marti Hearst, or James Landay.

Slides:



Advertisements
Similar presentations
Course Outline Presentation Term: F09 Faculty Name : Asma Sanam Larik Course Name :INTRO TO COMPUTING Course Code : CSE145 Section :1 Semester : 1.
Advertisements

Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
1 i206: Distributed Computing Applications & Infrastructure 2012
Use Case Diagram © copyright 2001 SNU OOPSLA Lab..
Object-Oriented Analysis and Design
Computer Organization Computer Architecture, Data Representation, Information Theory i206 Fall 2010 John Chuang Some slides adapted from Marti Hearst,
Computer Organization Boolean Logic and the CPU i206 Fall 2010 John Chuang Some slides adapted from Marti Hearst, Brian Hayes, or Glenn Brookshear.
Software Design Analysis of Algorithms i206 Fall 2010 John Chuang Some slides adapted from Glenn Brookshear, Marti Hearst, or Goodrich & Tamassia.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
I206: Distributed Computing Applications & Infrastructure Fall 2010.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
Review for Test 2 i206 Fall 2010 John Chuang. 2 Topics  Operating System and Memory Hierarchy  Algorithm analysis and Big-O Notation  Data structures.
1 Foundations of Software Design Lecture 1: Course Overview Intro to Binary and Boolean Marti Hearst SIMS, University of California at Berkeley.
Inter-Process Communication i206 Fall 2010 John Chuang Some slides adapted from Coulouris, Dollimore and Kindberg; Calvert and Donahoo.
Operating System & Memory Hierarchy i206 Fall 2010 John Chuang Some slides adapted from Glenn Brookshear, Brian Hayes, or Marti Hearst.
©Ian Sommerville 2006Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Chapter 1 Principles of Programming and Software Engineering.
© Copyright Eliyahu Brutman Programming Techniques Course.
Course Review i206 Fall 2010 John Chuang. 2 Outline  Test 3 topics  Course review  Course evaluation.
Chapter 1 Program Design
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Distributed Systems & Networks i206 Fall 2010 John Chuang Some slides adapted from Coulouris, Dollimore and Kindberg.
Unified Modeling Language 7/12/2015B.Ramamurthy1 The Unified Modeling Language™ (UML) was developed jointly by Grady Booch, Ivar Jacobson, and Jim Rumbaugh.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
Networking and Internetworking i206 Fall 2010 John Chuang.
CS130 Introduction to Programming with VB 6.0 Fall 2001.
Copyright © 2002, Systems and Computer Engineering, Carleton University Intro.ppt * Object-Oriented Software Development Unit 1 Course.
Welcome Aboard – Chapter 1 COMP 2610 Dr. James Money COMP
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
Quiz # 2 Chapters 4, 5, & 6.
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.
1 i206: Lecture 18: Regular Expressions Marti Hearst Spring 2012.
Compsci Today’s topics l Binary Numbers  Brookshear l Slides from Prof. Marti Hearst of UC Berkeley SIMS l Upcoming  Networks Interactive.
1 i206: Lecture 2: Computer Architecture, Binary Encodings, and Data Representation Marti Hearst Spring 2012.
The Beauty and Joy of Computing Lecture #3 : Creativity & Abstraction UC Berkeley EECS Lecturer Gerald Friedland.
1 i206: Lecture 9: Review; Intro to Algorithms Marti Hearst Spring 2012.
1 Systems Analysis and Design in a Changing World, Thursday, January 18, 2007.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Chapter 5 Models and UML Notation for The Object-Oriented Approach.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
UML Use Case Diagramming Guidelines. What is UML? The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing,
ALGORITHM List of instructions for carrying out some process step by step. A sequence of instructions which has a clear meaning and can performed with.
Chapter 5 Algorithms. © 2005 Pearson Addison-Wesley. All rights reserved 5-2 Chapter 5: Algorithms 5.1 The Concept of an Algorithm 5.2 Algorithm Representation.
1 System Analysis and Design Using UML INSTRUCTOR: Jesmin Akhter Lecturer, IIT, JU.
Computing and SE II Chapter 9: Design Methods and Design Models Er-Yu Ding Software Institute, NJU.
6. Program Translation CS100: The World of Computing John Dougherty Haverford College.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Lecture 14 22/10/15. The Object-Oriented Analysis and Design  Process of progressively developing representation of a system component (or object) through.
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
1 i206: Lecture 3: Boolean Logic, Logic Circuits Marti Hearst Spring 2012.
Chapter 7 Part II Structuring System Process Requirements MIS 215 System Analysis and Design.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Principles of Programming & Software Engineering
Computer Organisation
Unified Modeling Language
i206: Lecture 20: Memory Management; Operating Systems
Chapter 5: Algorithms Computer Science: An Overview Tenth Edition
Programming Languages
Unified Modeling Language
Presentation transcript:

Software Design i206 Fall 2010 John Chuang Some slides adapted from Glenn Brookshear, Brian Hayes, Marti Hearst, or James Landay

John Chuang2 Software Design Bits & Bytes Binary Numbers Number Systems Gates Boolean Logic Circuits CPU Machine Instructions Assembly Instructions Program Algorithms Application Memory Data compression Compiler/ Interpreter Operating System Data Structures Analysis I/O Memory hierarchy Design Methodologies/ Tools Process Truth table Venn Diagram DeMorgan’s Law Numbers, text, audio, video, image, … Decimal, Hexadecimal, Binary AND, OR, NOT, XOR, NAND, NOR, etc. Register, Cache Main Memory, Secondary Storage Context switch Process vs. Thread Locks and deadlocks Op-code, operands Instruction set arch Lossless v. lossy Info entropy & Huffman code Adders, decoders, Memory latches, ALUs, etc. Data Representation Data storage Principles ALUs, Registers, Program Counter, Instruction Register Network Distributed Systems Security Cryptography Standards & Protocols Inter-process Communication Searching, sorting, Encryption, etc. Stacks, queues, maps, trees, graphs, … Big-O UML, CRC TCP/IP, RSA, … Confidentiality Integrity Authentication … C/S, P2P Caching sockets Formal models Finite automata regex

John Chuang3 Outline (Next 5 Weeks)  Algorithm and Program  Programming Languages and Paradigms  Object-Oriented Design  Analysis of Algorithms  Data Structures  Regular Expressions

John Chuang4 Algorithm and Program  An algorithm is an ordered set of unambiguous, executable steps that defines a terminating process. -named after 9th century Persian mathematician Abu Ja'far Mohammed ibn Musa al-Khowarizmi  A computer program is a representation of an algorithm which prescribes the actions that are to be carried out by a computer. -A computer program consists of a set of instructions that the computer understands.

John Chuang5 Algorithms: Levels of Abstraction  Problem: motivation for algorithm  Algorithm: procedure to solve the problem -Often one of many possibilities  Representation: description of algorithm sufficient to communicate it to the desired audience -Always one of many possibilities

John Chuang6 Folding a Bird from a Square Piece of Paper Source: Brookshear Origami Primitives

John Chuang7 Sequential Search Algorithm in Pseudocode Source: Brookshear  Pseudocode primitives in bold

John Chuang8 Algorithm and Program  An algorithm is an ordered set of unambiguous, executable steps that defines a terminating process.  A computer program is a representation of an algorithm which prescribes the actions that are to be carried out by a computer. -A computer program consists of a set of instructions that the computer understands.

John Chuang9 Programming Languages  Machine language (1st generation)  Assembly language (2nd generation) -Simply a set of abbreviations for the machine code instructions -An assembler is used to translate the program into machine instructions  High-level language -A compiler or an interpreter is used to translate the program into machine instructions Source: Brookshear, Figure 6.2

John Chuang10

John Chuang11 Programming Paradigms  Imperative programming -describes computation in terms of statements that change a program state -Consistent with the sequential execution of instructions in hardware -E.g., procedural programming, object-oriented programming  Declarative programming -Describe desired results, without explicit description of steps -E.g., regular expressions, functional programming, logical programming

John Chuang12 Imperative Programming  Procedural programming -Specifies a sequence of algorithmic steps -Use of procedures (aka routines, subroutines, functions, or methods) to improve modularity, reuse  Object-oriented programming -Specifies a collection of objects, each with its own data and methods, and the collaborations between the objects -OOP promotes modularity and reuse via abstraction, encapsulation, inheritance -Helps keep large software projects, and projects with changing requirements, manageable

John Chuang13 OOP Example Source:

John Chuang14 Object-Oriented Design  Object-oriented design based upon principles of abstraction, encapsulation, and modularity  Object-oriented design through the clarification of object roles, responsibilities, and collaborations

John Chuang15 Role and Responsibility  Application: a set of interacting objects  Object: an implementation of one or more roles  Role: a set of related responsibilities  Responsibility: an obligation to perform a task (action) or to know information (data) Source: Wirfs-Brock and McKean, Object Design: Roles, Responsibilities, and Collaborations. an object knows information performs services maintains connections (to other objects) makes decisions (to do the right things)

John Chuang16 Collaboration  Collaboration: an interaction of objects or roles (or both)  Contract: an agreement outlining the terms of a collaboration Source: Wirfs-Brock and McKean, Object Design: Roles, Responsibilities, and Collaborations. a collaborator knows information performs services maintains connections (to other objects) makes decisions (to do the right things) an object needs help message asking for help

John Chuang17 Cohesion and Coupling  Q: how to come up with the right set of objects for a system? -Maximize cohesion (relationship within object) -Minimize coupling (relationship between objects) 1. Design using 3 chips (classes) 2. Design using 3 chips (classes)

John Chuang18 Cohesion and Coupling  Design 2 has too much coupling and not enough cohesion. As a result, it is: -difficult to understand -difficult to locate faults -difficult to reuse, extend, or enhance  Design 1 has better abstraction, encapsulation, and modularity

John Chuang19 OO Analysis & Design Process  Gather requirements  Develop use cases -Each use case describes what the system does to accomplish a particular customer goal  Analysis and Design -Iterative process of identifying roles, responsibilities, and collaborations -Textual analysis -Noun analysis to identify candidate classes -Verb analysis to identify candidate methods -Identification and use of design patterns -Design pattern: a general reusable solution to a commonly occurring problem

John Chuang20 Unified Modeling Language (UML)  UML is a language for specifying, visualizing, constructing, and documenting a software system  Several types of diagrams, including: -Use Case diagrams -Class diagrams -Sequence diagrams -…

John Chuang21 Use Case Diagram  A use case is a sequence of actions a system performs that yields an observable result to an external actor -A use case describes functionality of the system from the user's point of view -A good use case has: a single goal, an external initiator, a start condition, and an end condition -A use case is represented by an oval in UML  An actor is someone or something outside the system that interacts with the system -An actor can be a human being or another system or a device -An actor is represented by a stick figure in UML.

John Chuang22 Class Diagram  Captures the logical structure of the system, including objects and their relationships with one another Source: Brookshear, Figure 7.4

John Chuang23 Class Diagram Example Source:

John Chuang24 +: public - : private Representing Classes Source: Learning UML 2.0

John Chuang25 Representing Classes Source: Learning UML 2.0

John Chuang26 Relationships between Classes Source: Learning UML 2.0

John Chuang27 Relationships between Classes Source: Learning UML 2.0 “HAS-A”

John Chuang28 Relationships between Classes Source: Learning UML 2.0 Note: Inheritance is also known as generalization “IS-A”

John Chuang29 Class Diagram Example Source:

John Chuang30 Collaboration Diagram  Shows interactions between classes for one or more use cases Source: Brookshear, Figure 7.6

John Chuang31 Sequence Diagram  Shows interactions between classes over time for a particular use case  Place classes at the top of diagram  Draw vertical lines down from each class  Draw horizontal lines to the vertical lines to show interactions (method calls); label lines with the name of the message or method -Time goes from diagram’s top to bottom Source: Wikipedia

John Chuang32 Software Design Process  Software design is a creative problem solving process -Understand the problem (create use scenarios) -Find algorithmic procedure that might solve the problem (consider different solution options) -Formulate the algorithm and represent it as a program -Evaluate the program for accuracy and its potential as a tool for solving other problems -Iterate! Source: Brookshear, Figure Traditional Software Life Cycle