CC112 Structured Programming Lecture 1 1 Arab Academy for Science and Technology and Maritime Transport College of Engineering and Technology Computer.

Slides:



Advertisements
Similar presentations
CS101: Introduction to Computer programming
Advertisements

CS107 Introduction to Computer Science Lecture 3, 4 An Introduction to Algorithms: Loops.
1 ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
Overview of Programming and Problem Solving ROBERT REAVES.
INTRODUCTION TO PROGRAMMING
ITEC113 Algorithms and Programming Techniques
This set of slides is provided by the author of the textbook1 Introductory Topics (Continued) l Computer Components l Basic Control Structures l Problem.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
© Janice Regan Problem-Solving Process 1. State the Problem (Problem Specification) 2. Analyze the problem: outline solution requirements and design.
General Computer Science for Engineers CISC 106 Lecture 21 Dr. John Cavazos Computer and Information Sciences 04/10/2009.
CS107 Introduction to Computer Science Loops. Instructions Pseudocode Assign values to variables using basic arithmetic operations x = 3 y = x/10 z =
1 Chapter 1 Introduction to Object-Oriented Programming.
1 Chapter 1 Overview of Programming and Problem Solving Dale/Weems Slides based on work by Sylvia Sorkin, Community College of Baltimore County - Essex.
This set of slides is provided by the author of the textbook1 Introductory Topics l Computer Programming l Programming Life-Cycle Phases l Creating an.
Ch. 1: Software Development (Read) 5 Phases of Software Life Cycle: Problem Analysis and Specification Design Implementation (Coding) Testing, Execution.
Unit 171 Algorithms and Problem Solving  Introduction  Algorithm Design  Algorithm Properties  Algorithm Control Flow  Examples  Comparing Algorithms.
Algorithm Design CS105. Problem Solving Algorithm: set of unambiguous instructions to solve a problem – Breaking down a problem into a set of sub- problems.
Lecture Notes 1/21/04 Program Design & Intro to Algorithms.
Chapter 3 Planning Your Solution
BPC.1 Basic Programming Concepts
ALGORITHMS AND FLOW CHARTS 1 Adapted from the slides Prepared by Department of Preparatory year Prepared by: lec. Ghader Kurdi.
Fundamentals of C programming
1 Chapter 1 Overview of Programming and Problem Solving Dale/Weems Slides based on work by Sylvia Sorkin, Community College of Baltimore County - Essex.
U NDERSTANDING P ROBLEMS AND HOW TO S OLVE THEM BY USING C OMPUTERS.
Alexandria University Faculty of Science Computer Science Department Introduction to Programming (CS 102) C++ Programminhg.
CHAPTER 1 Overview of Programming and Problem Solving.
CC112 Structured Programming Lecture 4 1 Arab Academy for Science and Technology and Maritime Transport College of Engineering and Technology Computer.
1 Overview of Programming and Problem Solving Chapter 1.
CSE 102 Introduction to Computer Engineering What is an Algorithm?
CS 140 Computer Programming (I) Second semester (3 credits) Imam Mohammad bin Saud Islamic University College of Computer Science and Information.
Overview of Programming and Problem Solving Textbook Chapter 1 1.
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.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Chapter 2: General Problem Solving Concepts
CS221 Algorithm Basics. What is an algorithm? An algorithm is a list of instructions that transform input information into a desired output. Each instruction.
Recursive Algorithms &
1 Ch. 1: Software Development (Read) 5 Phases of Software Life Cycle: Problem Analysis and Specification Design Implementation (Coding) Testing, Execution.
CC112 Structured Programming Lecture 2 1 Arab Academy for Science and Technology and Maritime Transport College of Engineering and Technology Computer.
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Chapter 1 Overview of Programming and Problem Solving CS185/09 - Introduction to Programming Caldwell College.
Structured Programming (4 Credits)
Computer Programming CONTENTS Introduction to Operating Systems Introduction to programming languages Introduction to perl programming language Programming.
Data Structure Introduction Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2010.
The Hashemite University Computer Engineering Department
The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development Lecture 2 Debugging,
1 Overview of Programming Principles of Computers.
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
Alexandria University Faculty of Science Computer Science Department Introduction to Programming C++
C++ for Engineers and Scientists, Second Edition 1 Problem Solution and Software Development Software development procedure: method for solving problems.
Evolution of C and C++ n C was developed by Dennis Ritchie at Bell Labs (early 1970s) as a systems programming language n C later evolved into a general-purpose.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
1 Structured Programming Arab Academy for Science and Technology CC112 Dr. Sherif Mohamed Tawfik The Course.
Introduction to Problem Solving Programming is a problem solving activity. When you write a program, you are actually writing an instruction for the computer.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Selection Using IF THEN ELSE CASE Introducing Loops.
 Problem Analysis  Coding  Debugging  Testing.
ICS 3UI - Introduction to Computer Science
Algorithm and Ambiguity
An Introduction to Visual Basic .NET and Program Design
Introduction to Algorithms and Programming
Chapter 1 Introduction(1.1)
What is Computer Programming?
Algorithm and Ambiguity
Understanding Problems and how to Solve them by using Computers
Computer Science Core Concepts
Click to add Text Computers & Instructions. Computers are given instructions in the form of computer programs that are created through the development.
Basic Concepts of Algorithm
Presentation transcript:

CC112 Structured Programming Lecture 1 1 Arab Academy for Science and Technology and Maritime Transport College of Engineering and Technology Computer Engineering Department

C OURSE G OALS  Introduce General concepts of Programming  Begin to Think Like a Programmer  Start Programming With C (a powerful, widely-used programming language)  Become Junior C Programmer 2

C OURSE O UTLINE : 3 Introduction to Programming and problem solving. Program structure and simple program. Data types Assignment statements Input / output operations Arithmetic operations Logical operations Conditional and selection control statements Loops Functions (call by value / reference) Arrays ( 1D and 2D)

C OURSE GRADING SYSTEM Week #Marks Marks assigned to ExamSection

C OURSE TEXTBOOK C How To Program 7/e by:Paul Deitel & Harvey Deitel 5 C OURSE L ECURES / ASSIGNMENTS PDF copy on terminals in lab (300 and 312). Printed copy in AAST copy centers. URL: 2yu6db/Mu4R_2qamo

L ECTURE 1 Overview of Computer, Programming and Problem Solving 6

L ECTURE O UTLINE i. What is a Program? ii. What is Programming? i. Programming Life-Cycle Phases ii. Algorithm Basic Control Structures iii. Sample problem 7

i.W HAT IS P ROGRAM ? Computers process data under the control of sets of instructions called computer programs. These programs guide the computer through ordered actions specified by people called computer programmers. The programs that run on a computer are referred to as software. 8

ii.W HAT IS P ROGRAMMING ?  Find an algorithm to solve a problem.  Programmers take this algorithm to write a program using any programming language. 9 Given a well-defined problem:

Analyze This involves identifying the data you have to work with it, the desired results, and any additional requirements or constrains on the solution. Design An algorit hm is a step- by- step proced ure for solvin g a proble m in a finite amoun t of time. Implement Each algorithm is converted into one or more steps in a programming language. This process is called PROGRAMMING. 10 iii.P ROGRAMMING L IFE C YCLE P HASES

Test and verify Run the program several times using different sets of data, making sure that it works correctly for every situation in the algorithm. if it does not work correctly, then you must find out what is wrong with your program or algorithm and fix it--this is called DEBUGGING. Maintain and update maintenance begins when your program is put into use and accounts for the majority of effort on most programs. MODIFY the program to meet changing requirements or correct errors that show up in using it. 11 iii.P ROGRAMMING L IFE C YCLE P HASES

iv.A LGORITHM B ASIC C ONTROL S TRUCTURES 12  a sequence is a series of statements that execute one after another. Statement...

13 IF Condition THEN Statement1 ELSE Statement2 Statement1 Statement Statement2 Condition... True False iv.A LGORITHM B ASIC C ONTROL S TRUCTURES  selection (branch) is used to execute different statements depending on certain conditions.

14 Statement Condition... False True WHILE Condition Statement1 iv.A LGORITHM B ASIC C ONTROL S TRUCTURES  Looping (repetition) is used to repeat statements while certain conditions are met.

15 PROGRAM1... SUBPROGRAM1 a meaningful collection of SEQUENCE, SELECTION, LOOP, SUBPROGRAM  a subprogram is used to break the program into smaller units iv.A LGORITHM B ASIC C ONTROL S TRUCTURES

Finding the area and circumference of a circle. 1. Analyze the problem.  The problem input is the radius of the circle.  There are two outputs requested: the area and the circumference.  From our knowledge of geometry, we know the relationship between the radius of the circle and it area and circumference. 16 v.Sample Problem

2. D ESIGN THE ALGORITHM TO SOLVE THE PROBLEM. 1) Get circle radius 2) Calculate area using the following equation: area= π r 2 3) Calculate area using the following equation: circumference=2πr 4) Display area and circumference values. 17 v.Sample Problem

3. I MPLEMENT THE ALGORITHM. 1) Convert this algorithm into program instructions using a programming language. 2) Our desired progamming language is C. 18 v.Sample Problem

19