CS2006 - Data Structures I Chapter 2 Principles of Programming & Software Engineering.

Slides:



Advertisements
Similar presentations
1 ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
Advertisements

Overview of Programming and Problem Solving ROBERT REAVES.
Object Oriented Design An object combines data and operations on that data (object is an instance of class) data: class variables operations: methods Three.
Software Engineering and Design Principles Chapter 1.
Chapter 6: Design of Expert Systems
1 CS 501 Spring 2003 CS 501: Software Engineering Lecture 2 Software Processes.
© Prentice Hall CHAPTER 9 Application Development by Information Systems Professionals.
Department of Computer Science University of Maryland, College Park
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
1 CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
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.
Chapter 1 Program Design
9 1 Chapter 9 Database Design Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
MCA –Software Engineering Kantipur City College. Topics include  Formal Methods Concept  Formal Specification Language Test plan creation Test-case.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
Data Structures and Programming.  John Edgar2.
CS102 Introduction to Computer Programming
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Introduction to Programming Prof. Rommel Anthony Palomino Department of Computer Science and Information Technology Spring 2011.
Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution.
Managing the development and purchase of information systems (Part 1)
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Developing a Program.
Simple Program Design Third Edition A Step-by-Step Approach
Introduction Ellen Walker CPSC 201 Data Structures Hiram College.
CompSci 105 SS 2005 Principles of Computer Science Lecture 4 Lecturer: Santokh Singh.
Chapter 2: Software Process Omar Meqdadi SE 2730 Lecture 2 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Programming Lifecycle
Program Development Life Cycle (PDLC)
1 C++ Plus Data Structures Nell Dale Chapter 1 Software Engineering Principles Modified from the Slides made by Sylvia Sorkin, Community College of Baltimore.
© 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Stewart Venit ~ Elizabeth Drake Developing a Program.
Chapter 7 Software Engineering Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Software Engineering Chapter 3 CPSC Pascal Brent M. Dingle Texas A&M University.
Chapter 1 Program design Objectives To describe the steps in the program development process To introduce the current program design methodology To introduce.
Introduction to Problem Solving. Steps in Programming A Very Simplified Picture –Problem Definition & Analysis – High Level Strategy for a solution –Arriving.
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
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.
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
Chapter 3 Top-Down Design with Functions Part II J. H. Wang ( 王正豪 ), Ph. D. Assistant Professor Dept. Computer Science and Information Engineering National.
© 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.
Program Development Cycle
Software Engineering and Object-Oriented Design Topics: Solutions Modules Key Programming Issues Development Methods Object-Oriented Principles.
CS 1120: Computer Science II Software Life Cycle Slides courtesy of: Prof. Ajay Gupta and Prof. James Yang (format and other minor modifications by by.
M1G Introduction to Programming 2 3. Creating Classes: Room and Item.
CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles.
Chapter 1 Software Engineering Principles. Problem analysis Requirements elicitation Software specification High- and low-level design Implementation.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Software Development Process CS 360 Lecture 3. Software Process The software process is a structured set of activities required to develop a software.
CMSC 2021 Software Development. CMSC 2022 Software Development Life Cycle Five phases: –Analysis –Design –Implementation –Testing –Maintenance.
Chapter 2 Principles of Programming and Software Engineering.
Barron’s chapter 5 Software development life cycle.
CSCI 161 Lecture 3 Martin van Bommel. Operating System Program that acts as interface to other software and the underlying hardware Operating System Utilities.
Introduction to Computer Programming using Fortran 77.
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.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Software Engineering Algorithms, Compilers, & Lifecycle.
Principles of Programming & Software Engineering
C++ Plus Data Structures
The Software Development Cycle
Principles of Programming and Software Engineering
Algorithm and Ambiguity
Introduction to Problem Solving
CS 1120: Computer Science II Software Life Cycle
Algorithm and Ambiguity
CS 1120: Computer Science II Software Life Cycle
Basic Concepts of Algorithm
The Software Development Cycle
Presentation transcript:

CS Data Structures I Chapter 2 Principles of Programming & Software Engineering

2 Topics Software Life Cycle

3 Introduction How do you write a Java program? Old fashion way Write code Compile Check syntax Run Check logic How long will this take? Which phase takes more time?

4 Introduction A better way Systematic way (Structured approach) Specify problem Analyze Design Implement Test Maintain

5 Introduction SW Engineering: Computer science branch that provides techniques for development of computer programs Systematic approach to analyze, design, implement, and maintain software Uses CASE tools

6 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing 7. Refining 8. Production 9. Maintainence

7 1. Specification & Analysis Specification A contract between the module and any other module using it Doesn't include information about how the task is to be performed or the method of solution, but what May involve construction of a prototype program to get more details from users.

8 1. Specification & Analysis Example: “begin & write a software to store a library’s catalogue of books” Input: Librians enter new books as they arrive Library users enter search keys to search through our list

9 1. Specification & Analysis Process: Add new book Search for books Output: Show all the info about a book Requirements What type of processing is required Are there any time/space/performance constraints

10 2. Design Given: Clear & detailed specification of all aspects of the problem Output: Design for a solution to the problem Idea: Use modular design Divide & conquer Divide the problem into smaller manageable parts.

11 2. Design Generate an outline of the problem solution. Requires breaking the entire problem down into small manageable parts - modules. Modules are self-contained units of code.

12 2. Design Design Example: Sort Function Purpose: Sort an array of integers Specification: Receive an array of N integers (input), where N > 0 (assumption) Return the array (output) with the integers sorted (action) Remember: Specification is a contract

13 2. Design Design Example: Sort Function First-draft specification: Sort(A, N) // Sorts an array // Precondition: A is an array of N integers; N > 0 // Postcondition:Integers in A are sorted What is missing?

14 2. Design Design Example: Sort Function Revised Specification: Sort(A, N) // Sorts an array of MAX_ARRAY elements // Precondition: // A is an array of N integers; // and 1 <= N <= MAX_ARRAY, // where MAX_ARRAY is a global constant // that specifies the maximum size of A // Postcondition: // A [0] <= A [1] <=... <= A [N-1], // N is unchanged

15 3. Risk Analysis Risks are primarily business related but can be personal as well. Example: If a piece of software is not ready in time the company may lose the market to a competitor. Not an important issue for this course.

16 4. Verification Determining the degree to which a software product fulfills its specification Formal, theoretical methods for proving algorithm correctness Assertion (Predicate): Statement about a particular condition at certain point in an algorithm Invariant: Condition that is always true at a certain point in an algorithm

17 5. Implementation (Coding) Coding Translating the algorithm into a particular programming language & removing syntax errors Should not start unless previous stages are well defined Original solution usually simplified

18 5. Coding Bottom-up implementation: First implement submodules, then modules Top-down implementation: Implement a module before implementing its submodules Use stubs Refinement might be needed Stubs: Dummy functions that do nothing and are placed in the place of submodules to focus attention on the module itself A S3S2S1

19 6. Testing Careful design of test data is important Valid (In-range) data Invalid (out-of-range) data Random values of data Test several times on different circumstances Any modification in the program needs re- testing

20 7. Refining the Solution Usually involves increasing the "robustness" of a solution. Often simplifying assumptions are made in the design process that must be removed from final versions. Example: assume that the input will be be integers between 0 and During this step code would be inserted to actually test the input values.

21 8. Production Distribute the SW product to its intended users Install the SW Use the SW

22 9. Maintenance Correct errors not discovered during testing Add more features Enhance existing features Modify to suit the user better

23 Review The first phase of the life cycle of software is the ______ phase. design risk analysis specification coding

24 Review The syntax errors of a program are removed during the ______ phase of the program’s life cycle. verification coding testing refining maintenance

25 Review Which of the following is an example of a logical error? an algorithm that calculates the monthly payment of a loan displays incorrect results an array subscript in a program goes out of range a program expects a nonnegative number but reads –23 the beginning of a while loop is written as “whille” instead of “while”

26 Review During the design phase of the software life cycle, the program is divided into ______. invariants loops Modules prototypes

27 Review A prototype program is created during the ______ phase of the software life cycle. design specification Coding testing