1 Chapter-01 Introduction to Software Engineering.

Slides:



Advertisements
Similar presentations
Exercise 2.
Advertisements

Chapter 1: An Overview of Computers and Programming Languages
LECTURE 1 CMSC 201. Overview Goal: Problem solving and algorithm development. Learn to program in Python. Algorithm - a set of unambiguous and ordered.
COSC 120 Computer Programming
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Your First C++ Program Aug 27, /27/08 CS 150 Introduction to Computer Science I C++  Based on the C programming language  One of today’s most.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
1 Introduction to Software Engineering Lecture 42 – Communication Skills.
Computer Programming 1 Problem Solving and Software Engineering.
1 September 6, 2005CS150 Introduction to Computer Science I What Actions Do We Have Part 1 CS150 Introduction to Computer Science I.
1 9/08/06CS150 Introduction to Computer Science 1 Arithmetic Operators.
Computer Science 1620 Programming & Problem Solving.
Chapter 1 Principles of Programming and Software Engineering.
Chapter 1: An Overview of Computers and Programming Languages
1 8/30/06CS150 Introduction to Computer Science 1 Your First C++ Program.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages Updated by: Dr\Ali-Alnajjar.
COS120 Software Development Using C++ AUBG Fall semester 2010
Programming is instructing a computer to perform a task for you with the help of a programming language.
Software Engineering 1 (Chap. 1) Object-Centered Design.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Chapter 2: Developing a Program Prelude to Programming Concepts and Design Copyright © 2001 Scott/Jones, Inc.. All rights reserved. 1 Chapter 2 Developing.
1 Programming and Problem Solving — Software Engineering (Read Chap. 2)
Programming and Problem Solving — Software Engineering (Read Chap. 2) 1.
Problem Solving and Software Engineering Chapter 1.
CHAPTER 1: INTRODUCTION TO COMPUTER SCIENCE Introduction to Computer Science Using Ruby (c) 2012 Ophir Frieder et al.
C++ Basics Structure of a Program. C++ Source Code Plain text file Typical file extension .CPP Must compile the C++ source code without errors before.
Creating your first C++ program
Libraries Making Functions Globally Reusable (§ 6.4) 1.
Chapter 1 Introduction to Computers and C++ Programming Goals: To introduce the fundamental hardware and software components of a computer system To introduce.
1 Chapter-01 Introduction to Software Engineering.
Beginning C++ Through Game Programming, Second Edition
CHAPTER 7 DATA INPUT OUTPUT Prepared by: Lec. Ghader R. Kurdi.
N from what language did C++ originate? n what’s input, output device? n what’s main memory, memory location, memory address? n what’s a program, data?
Libraries 1 Making Functions Globally Reusable (§ 4.6)
1 Simple Functions Writing Reuseable Formulas. In Math Suppose f (x) = 2 x 2 +5Suppose f (x) = 2 x 2 +5 f(5)=?f(5)=? f(5) = 2* =55f(5) = 2*
1 An Example. Problem Using OCD, design and implement a program that computes the area and circumference of an Australian Rules Football field, which.
Chapter 4: Subprograms Functions for Problem Solving Mr. Dave Clausen La Cañada High School.
C++ Basics C++ is a high-level, general purpose, object-oriented programming language.
1 Chapter-01 Introduction to Software Engineering.
COSC1557: Introduction to Computing Haibin Zhu, PhD. Professor Department of Computer Science Nipissing University (C) 2014.
1 Original Source : and Problem and Problem Solving.ppt.
Developing an Algorithm. Simple Program Design, Fourth Edition Chapter 3 2 Objectives In this chapter you will be able to: Introduce methods of analyzing.
Control Structures (B) Topics to cover here: Sequencing in C++ language.
Software Engineering Object-Centered Design. Problem Solving Does anyone scuba dive? Let’s solve this scuba-diving problem: Write a program that, given.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
1 8/31/05CS150 Introduction to Computer Science 1 Hello World!
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Lesson - 2. Introduction When we make a program we must follow some steps, called Programming Development Life Cycle (PDLC). Programming steps are five:
How to Program? -- Part 1 Part 1: Problem Solving –Analyze a problem –Decide what steps need to be taken to solve it. –Take into consideration any special.
Simple Functions Writing Reuseable Formulas. Problem Using OCD, design and implement a program that computes the area and circumference of an Australian.
Libraries Making Functions Reuseable. Review Last time, we wrote a program to compute the area and circumference of an ellipse. a a bb.
Introduction to Programming
Libraries 1 Making Functions Globally Reusable (§ 6.4)
Software Engineering (Chap. 1) Object-Centered Design When we prepare a program, the experience can be just like composing poetry or music … My claim is.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
1 8/30/06CS150 Introduction to Computer Science 1 Your First C++ Program.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
Chapter 1: An Overview of Computers and Programming Languages
Engineering Problem Solving With C An Object Based Approach
Completing the Problem-Solving Process
Chapter 1: An Overview of Computers and Programming Languages
Writing Reuseable Formulas
solve the following problem...
Chapter 1: An Overview of Computers and Programming Languages
Chapter 1 Introduction(1.1)
Chapter 1: An Overview of Computers and Programming Languages
Part 6 Q26 to Q30 of National 5 Prelim
Object-Centered Design
Presentation transcript:

1 Chapter-01 Introduction to Software Engineering

2 Software Engineering Object-Centered Design

3 Problem Solving Does anyone carpet? Let’s solve this area problem: –Write a program that, given a length and width, computes the area of a carpet.

4 Behavior A. Describe the desired behavior of the program: Our program should display a prompt for length and width, read length and width from the keyboard, compute the corresponding area, and display the area, along with a descriptive label on the screen.

5 Objects B. Identify the nouns in the behavioral description (other than program and user): Our program should display a prompt for length and width on the screen, read length and width from the keyboard, compute the corresponding area, and display the area, along with a descriptive label on the screen. These make up the objects in our program.

6 Operations C. Identify the verbs in the behavioral description: Our program should display a prompt for the length and width on the screen, read the length and width from the keyboard, compute the corresponding area, and display the area, along with a descriptive label on the screen. These make up the operations in our program.

7 Algorithm D. Organize the objects and operations into a sequence of steps that solves the problem, called an algorithm. 1. Display a prompt for length and width on the screen. 2. Read length and width from the keyboard. 3. Compute area from length and width. 4. Display area, plus an informative label on the screen.

8 Coding Once we have designed an algorithm, the next step is to translate that algorithm into a high level language like C++. This involves figuring out how to –represent our objects, and –perform our operations, in C++ (with the aid of a book...)

9 Representing Objects A. Determine a type and name for each object:

10 Performing Operations B. Identify the C++ operator to perform a given operation, if there is one... To compute area, we need to find the area-length- width formula in a geometry book...

11 Length and Width-to-Area In a geometry book, we find that –area is the product of length and width

12 Operations (Revised)

13 Documentation Always begin a file with an opening comment: /* area.cpp is a area calculating utility. * Author: Bazlur Rasheed * Date: 02 July 2000 * Purpose: Calculate area of a rectangle. */

14 Coding: Program Stub /* area.cpp is a area calculating utility. *... */ #include // cin, cout, > using namespace std; int main() { }

15 Coding: Algorithm Steps 1 //... int main() { cout << “\n Rectangular Area Calculator!!” << "\n Enter the length (meter) and ” << “width (meter)” << "\n seperated by a space and “ << “followed by the enter key: "; }

16 Coding: Algorithm Steps 2 //... int main() { cout << “\n Rectangular Area Calculator!” << "\n Enter the length (meter) and” << “ width (meter)” << "\n seperated by a space and“ << “ followed by the enter key: "; int length, width; cin >> length >> width; }

17 Coding: Algorithm Step 3 //... cout << “\n Rectangular Area Calculator!” << "\n Enter the length (meter) and ” << “width (meter)” << "\n seperated by a space and “ << “followed by the enter key: "; int length, width; cin >> length >> width; int area = length * width; }

18 Coding: Algorithm Step 4 //... int area = length * width; cout << "\n The length of " << length << " meter and the width of " << width << " meter \n makes an area of " << area << "sq meter. \n\n"; }

19 Testing Run your program using sample data (whose correctness is easy to check): Rectangular Area Calculator! Enter the length (meter) and width (meter) separated by a space and followed by the enter key: The area is 200 sq. meter

20 Summary of OCD OCD is a methodology for designing programs: 1. Describe the desired behavior of the program. 2. Identify the objects required. 3. Identify the operations required. 4. Organize objects and operations into an algorithm, refining object and operation lists as necessary.

21 Summary of Programming Writing a program consists of these steps: 1. Design an algorithm for your program. 2. Code your design. 3. Test your program. 4. Maintain/upgrade your program as necessary.