Download presentation
Presentation is loading. Please wait.
1
The Programming Process
Define the problem * Make or buy software? Design the program * Code (write) the program Test (debug) the program Document the program *
2
Define the Problem What do you want to solve? What is the objective?
What is the question?
3
Define the Problem You need: Clear, specific statement of goal
Expected output Expected input
4
Define the Problem You need to know: Constraints? Special conditions?
Make a plan
5
Documentation improve readability you remember others understand
maintenance
6
Design a Solution break the problem into smaller parts
break subproblems into smaller solvable components do other solutions exist? pros and cons of each solution solve each subproblem integrate the solutions to the subproblems to solve the original problem * * * * *
7
Structured Programming
Not one giant step Many small tasks Programmer concentrate on details Usually done in teams
8
Structured Programming
Reduces time (and $) Different modules Errors isolated Design written in code
9
Introduction Dumb Machines Algorithms pseudocode structure charts
flowcharts
10
PSEUDOCODE Logical steps Written in English
begin game display instructions pick a number between 1 and 100 repeat turn until number is guessed or seven turns are completed input guess from user respond to guess end repeat end game display end message Logical steps Written in English Indenting for logical structures
11
Flowchart Logical steps represented by standard symbols *
display instructions get number is number even? Yes No continue *
12
Test the Design Does it solve our problem?
no - select another design - return to the analysis of the problem yes - move on
13
NO plan, NO help Implement the Design NO plan, NO help
Lease creative part Choose a language Write the code NO plan, NO help NO plan, NO help NO plan, NO help NO plan, NO help *
14
Design Example Linear Search
Problem: Find the largest number in a list Algorithm: call the 1st is the largest call the 2 nd current (cont.) *
15
Design Example Linear Search
1 while we are not finished 2 compare the largest to the current 3 if current > largest 4 label current as largest call next number in the list current 6 repeat the while 7 output the largest 5 call next number in the list current *
16
Programming Languages
Over 200 languages Language depends upon task COBOL Logo C++ ADA Pascal FORTRAN BASIC
17
Introduction Levels of Computer Languages: Low machine assembly
18
Introduction Levels of Computer Languages: High COBOL Pascal FORTRAN Logo
19
Introduction Levels of Computer Languages: Mid-level C C++
20
Introduction Procedural languages Object-Oriented languages (OOP)
21
Computer Can’t Understand
COBOL FORTRAN Pascal BASIC ADA LISP
22
Introduction Translation to Machine Language Interpreter
Compiler linker
23
Introduction source code object code .exe file compiler - h-files used
linked to libraries .exe file * *
24
Object-Oriented Programming (OOP)
OOP Concepts Polymorphism Encapsulation Inheritance Object-Oriented Programming (OOP)
25
OOP Concepts Encapsulation Self-contained unit Data Abstraction Usable without knowing how it works
26
OOP Concepts Inheritance Polymorphism * *
27
OOP Concepts class = a user-defined data type
A class contains variables called objects and functions called methods.
28
“I discovered I always have choices, and sometimes it’s only a choice of attitude.”
Judith M. Knowlton
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.