Spring 2009CS 225 Introduction to Software Design Chapter 1.

Slides:



Advertisements
Similar presentations
10 Software Engineering Foundations of Computer Science ã Cengage Learning.
Advertisements

Cmp Sci 187: Introduction to Software Design Following Chapter 1 of text (Koffmann and Wolfgang)
1 The Software Challenge People may come and go, but software may remain A software product is often expected to be used for an extended period of time.
1 Lecture 2: Processes, Requirements, and Use Cases.
Software Design. The Software Challenge In industry, a software product is expected to be used for an extended period of time by someone who did not write.
MCS 231: Concepts of Data Structure Class Hour: Section 1: MW 2:15PM - 3:30PM. Hyland 2306.
ITEC200 Week01 Introduction to Software Design.
Introduction To System Analysis and Design
Fall 2007CS 225 Introduction to Software Design Chapter 1.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Fall 2007CS 2251 Software Engineering Intro. Fall 2007CS 2252 Topics Software challenge Life-cycle models Design Issues Documentation Abstraction.
Information Systems Development Lecture 2: the idea of the Life Cycle.
©Ian Sommerville 2006Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives Intro - Software OOP Inheritance, interfaces,
1 CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Chapter 1 Principles of Programming and Software Engineering.
Chapter 1 Software Engineering. Homework ► Read Section 2.2 (pages 79-98) ► Answer questions: ► 7, 8, 11, 12, & 13 on page 134. ► Answer on paper, hand.
Software Engineering Principles and C++ Classes
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
The Software Product Life Cycle. Views of the Software Product Life Cycle  Management  Software engineering  Engineering design  Architectural design.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative Development Part III Elaboration Iteration I – Basic1.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Lesson 1 Week01.
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
Chapter 2: Approaches to System Development
Object Oriented Analysis and Design Introduction.
Chapter 1: Introduction to Systems Analysis and Design
Introduction Ellen Walker CPSC 201 Data Structures Hiram College.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Case Study: Designing A Telephone Directory Program Ellen Walker CPSC 201 Data Structures Hiram College Includes figures from Objects, Abstraction & Data.
Unified Modeling Language, Version 2.0
Introduction to Software Design Chapter 1. Chapter Objectives  To become familiar with the software challenge and the software life cycle  To understand.
CPSC 2150 August 21, Chapter 1 Object Oriented Software Development This is an introductory course In this chapter we will look at 3 topics Challenges.
10/12/ Recall The Team Skills 1. Analyzing the Problem (with 5 steps) 2. Understanding User and Stakeholder Needs 1. Interviews & questionnaires.
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Chapter 7 System models.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Systems Analysis and Design in a Changing World, 3rd Edition
The Systems Development Life Cycle
Programming Life Cycle Problem analysisunderstand the problem Requirements definition specify what program will do High- and low-level designhow it meets.
Data Structures Using C++1 Chapter 1 Software Engineering Principles and C++ Classes.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
Object-Oriented Analysis and Design. Lesson 1: Introduction to Software Engineering.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Data Structures Using C++ 2E
© 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.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
Software Engineering and Object-Oriented Design Topics: Solutions Modules Key Programming Issues Development Methods Object-Oriented Principles.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Data Structure Introduction Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2010.
Chapter 1 Data Abstraction: The Walls CS Data Structures Mehmet H Gunes Modified from authors’ slides.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 4 Slide 1 Software Processes.
Chapter 1 Software Engineering Principles. Problem analysis Requirements elicitation Software specification High- and low-level design Implementation.
1 SYS366 Week 1 - Lecture 1 Introduction to Systems.
Basic Characteristics of Object-Oriented Systems
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 1 An Introduction to Visual Basic.NET and Program Design.
Chapter 1: Introduction to Systems Analysis and Design
School of Business Administration
Systems Analysis and Design With UML 2
About the Presentations
Rational Unified Process
SOFTWARE LIFE-CYCLES Beyond the Waterfall.
Chapter 1: Introduction to Systems Analysis and Design
Chapter 1: Introduction to Systems Analysis and Design
Presentation transcript:

Spring 2009CS 225 Introduction to Software Design Chapter 1

Spring 2009CS 225 A major goal of software engineering is to write reusable code

Spring 2009CS 225 Chapter Topics Software life cycle Top-down design and object-oriented design Managing complexity using data abstraction, procedural abstraction, and information hiding Class diagrams to document the interaction between classes Abstract data types Array-based telephone directory

Spring 2009CS 225 The Software Challenge In industry, a software product is expected to be used for an extended period of time by someone who did not write the program and who is not intimately familiar with its internal design Initial specification for a software product may be incomplete Specification is clarified through extensive interaction between users of the software and the system analyst

Spring 2009CS 225 The Software Challenge A requirements specification should be generated at the beginning of any software project Designers and users should both approve the document

Spring 2009CS 225 The Software Life Cycle Software products go through several stages as they mature from initial concept to finished product The sequence of stages is called a life cycle It is important to design and document software in an organized way so that it can be easily understood and maintained after the initial release The person who maintains the software is not necessarily the person who writes it

Spring 2009CS 225 Waterfall Model Simplest model of software development Activities performed in sequence Simple but unworkable –Fundamental flaw is assumption that each stage can and must be completed before the next one occurs Sometimes, it is not until the product is finished that the user can fully express his or her requirements

Spring 2009CS 225 Waterfall Model

Spring 2009CS 225 Software Life Cycle Models Common themes among alternative models is to develop software product in stages or cycles Unified Model: the cycles are called phases and iterations and the activities are called workflows Four phases –Inception –Elaboration –Construction –Transition

Spring 2009CS 225 Unified Model Life Cycle Model

Spring 2009CS 225 Software Life Cycle Activities Requirements specification Architectural, component, and detailed designs Implementation Unit, integration, and acceptance tests Installation and maintenance

Spring 2009CS 225 Software Life Cycle Activities

Spring 2009CS 225 Software Life Cycle Activities Requirements Specification –System analyst works with software users to clarify the detailed system requirements –Questions include format of input data, desired form of any output screens, and data validation Analysis –Make sure you completely understand the problem before starting the design or program a solution –Evaluate different approaches to the design

Spring 2009CS 225 Software Life Cycle Activities Design –Top-down approach: breaking a system into a set of smaller subsystems –Object-oriented approach: identification of a set of objects and specification of their interactions –UML diagrams are a design tool to illustrate the interactions between Classes Classes and external entities

Spring 2009CS 225 Telephone Directory

Spring 2009CS 225 Class Diagram

Spring 2009CS 225 Using Abstraction to Manage Complexity An abstraction is a model of a physical entity or activity Abstraction helps programmers deal with complex issues in a piecemeal fashion Procedural abstraction: distinguish what is to be achieved by a procedure from its implementation Data abstraction: specify the data objects for a problem and the operations to be performed on them without concern for their representation in memory

Spring 2009CS 225 Using Abstraction to Manage Complexity If a higher-level class references a data object only through its methods, the higher-level class will not have to be rewritten, even if the data representation changes Information hiding: Concealing the details of a class implementation from users of the class

Spring 2009CS 225 Abstract Data Types Abstract data type (ADT): The combination of data together with its methods

Spring 2009CS 225 Interfaces A Java interface is a way to specify an ADT –The interface specifies the names, parameters, and return values of the ADT methods without specifying how the methods perform their operations and without specifying how the data is internally represented Each class that implements an interface must provide the definitions of all methods declared in the interface

Spring 2009CS 225 Interfaces You cannot instantiate an interface You can declare a variable that has an interface type and use it to reference an actual object A Java interface is a contract between the interface designer and the programmer who codes a class that implements the interface

Spring 2009CS 225 Pre- and Postconditions Precondition: a statement of any assumptions or constraints on the method data before the method begins execution Postcondition: a statement that describes the result of executing a method

Spring 2009CS 225 Requirements Analysis, Use Cases, and Sequence Diagrams First step in analysis is to study the problem of input and output requirements carefully to make sure they are understood and make sense Use case: list of the user actions and system responses for a particular sub-problem in the order that they are likely to occur Sequence diagram: shows all the objects involved in this use case across the horizontal axis, time is shown along the vertical axis

Spring 2009CS 225 Design of an Array-Based Phone Directory Case study deals with design, implementation, and testing of the software-based phone directory In UML class diagrams –+ sign next to a method or attribute means it is public –- sign next to a method or attribute means it is private Classes to design include: PDUserInterface PDApplication PhoneDirectory ArrayBasedPD DirectoryEntry

Spring 2009CS 225 Array-Based Phone Directory (continued)

Spring 2009CS 225 Interfaces for Phone Directory PDUserInterface –Allows different ways of interacting with the data by changing only one class PhoneDirectory –Specifies all needed operations –Allows the underlying implementation to change without affecting the rest of the classes

Spring 2009CS 225 Design of DirectoryEntry

Spring 2009CS 225 UML for DirectoryEntry

Spring 2009CS 225 Phone Directory Interface

Spring 2009CS 225 ArrayBasedPD

Spring 2009CS 225 Array-Based Phone Directory

Spring 2009CS 225 ArrayBasedPD: Private Methods

Spring 2009CS 225 Questionable Code Note that some code in this application is controversial –Combination of assignment with the evaluation of a condition –Break statement allows exiting of the while loop without storing an entry

Spring 2009CS 225 Implementing PDUserInterface PDUserInterface must contain a public method, processCommands We show two different classes that implement the PDUserInterface: –PDGUI Class –PDConsoleUI

Spring 2009CS 225 GUI Implemention This class provides a GUI input using JOptionPane dialog windows

Spring 2009CS 225 Console Implemention Implemented using PDConsoleUI class This class uses System.out to display the menu of choices and results. It also uses a Scanner object (scIn) associated with System.in to read data from the keyboard.