Chapter 14 :
PROGRAMMING
AND LANGUAGES

Iostreamteam
PROGRAMS AND PROGRAMMING
What is a program?
●

A list of instructions for the computer to follow to
accomplish a task of p...
The six steps are as follows:
STEP 1 : PROGRAM SPECIFICATION
●

Also called program definition or program analysis
●

Requires: programmer and end user
...
STEP 2 : PROGRAM
DESIGN
●

●

Plan a solution using structured
programming technique
These techniques consist:

1) Top dow...
2)Pseudocode
An outline of the logic of the program
you will write
It is like doing summary of the program
before it is wr...
Logic Structures
●

●

●

The best way to link the various part of the flowcharts is by
combines three logic structures ca...
●

●

●

The repetition or loop structures describe a process that
may be repeated as long as a certain condition remains
...
LOGIC STRUCTURES
STEP 3 : PROGRAM CODE
●

Writing the program is called CODING
ASPECTS OF WRITING A PROGRAM
1)GOOD PROGRAMS
●

●

Good programs are reliable ,detect obvious and common
errors and are we...
2)CODING
There are hundreds of different programming languages.
Two types are:

●

●

Content mark-up language-instruct a ...
STEP 4 : PROGRAM TEST
●

●

Debugging is a process of testing and
eliminating errors in a program
Syntax and logic are two...
SYNTAX ERROR

●

A violation of the rules of the programming language

●

Example in C++, each statement must end with a s...
TESTING PROCESS
Five methods for testing for syntax and logic error are
●

●

●

●

●

1)Desk checking(code review):carefu...
STEP 5: PROGRAM DOCUMENTATION
●

●

Documentation consist of written description
and procedures about a program and how to...
People who use documentation
include:
Users
●

who need to know how to use the program

●

some organizations offer traini...
STEP 6 : PROGRAM MAINTENANCE
●

Design to ensure that the program operates correctly, efficiently and
effectively

●

Two ...
CASE and OOP
CASE
●

Computer-aided software engineering(CASE) tools provide
automation and assistance in program design ,...
GENERATIONS
OF
PROGRAMMING
LANGUAGES
 Programming languages have
levels or generations ranging
from low to high.

1.Lower-level languages are
closer to the 0s...
Generation

Sample statement

First :
Machine languages

111100100111001111001111111

Second:
Assembly languages

ADD 210(...
CARRIERS IN
IT
 Computer programmers create, test, and

troubleshoot programs.
 They also update and repair existing programs
 Require...
programming and languages (chapter 14)
Upcoming SlideShare
Loading in …5
×

programming and languages (chapter 14)

551 views

Published on

slide show about programming and language..
enjoy !!

Published in: Education, Technology
  • Be the first to comment

programming and languages (chapter 14)

  1. 1. Chapter 14 : PROGRAMMING AND LANGUAGES Iostreamteam
  2. 2. PROGRAMS AND PROGRAMMING What is a program? ● A list of instructions for the computer to follow to accomplish a task of processing data into information. What is programming? ● ● Also known as software development / software development life cycle(SDLC) A six step procedure for creating that a list of instructions
  3. 3. The six steps are as follows:
  4. 4. STEP 1 : PROGRAM SPECIFICATION ● Also called program definition or program analysis ● Requires: programmer and end user ● Five tasks: 1- Program objectives : the first task is to clearly define the problem to solve in the form of program objectives. 2-Desired output : focus on the desired output before considering the required inputs. 3-Input data : once outputs are defined ,determine the necessary input data and the source of the data. 4-Processing requirements : determine the steps necessary (processing requirements) to use input to produce output. 5-Program specifications document : to record this step’s program objectives ,outputs, inputs and processing requirements.
  5. 5. STEP 2 : PROGRAM DESIGN ● ● Plan a solution using structured programming technique These techniques consist: 1) Top down program design ● ● ● ● To identify the program's processing steps Such steps are called program modules Each module are made up of logically related program statements Example time and biling report
  6. 6. 2)Pseudocode An outline of the logic of the program you will write It is like doing summary of the program before it is written 3)Flowcharts These graphically present the detail sequence of steps needed to solve a programming problem
  7. 7. Logic Structures ● ● ● The best way to link the various part of the flowcharts is by combines three logic structures called concatenation ,selection and repetition. In the concatenation structures-one program statements follow another. There is no question of “yes” or “no” of the decision suggesting other consequences. The selection structures(IF-THEN-ELSE)- occurs when a decision must be made.
  8. 8. ● ● ● The repetition or loop structures describe a process that may be repeated as long as a certain condition remains true The structures is called “loop” or “iteration” because the program loops around again and again The repetition structures has two variation DO UNTIL and DO WHILE
  9. 9. LOGIC STRUCTURES
  10. 10. STEP 3 : PROGRAM CODE ● Writing the program is called CODING
  11. 11. ASPECTS OF WRITING A PROGRAM 1)GOOD PROGRAMS ● ● Good programs are reliable ,detect obvious and common errors and are well documented. The best way to create good programs is to write structured programs using the three basic logic structures presented in steps 2.
  12. 12. 2)CODING There are hundreds of different programming languages. Two types are: ● ● Content mark-up language-instruct a computer how to process different types types of information. Example HTML used to create web pages. Programming language-instruct a computer to perform specific operations. C++ is widely used programming language.
  13. 13. STEP 4 : PROGRAM TEST ● ● Debugging is a process of testing and eliminating errors in a program Syntax and logic are two types of programming errors.
  14. 14. SYNTAX ERROR ● A violation of the rules of the programming language ● Example in C++, each statement must end with a semicolon(;) LOGIC ERROR ● ● Occur when the programmer uses an incorrect calculation or leaves out a programming procedures Example, failure to include calculation of overtime hours in a payroll program in a logic error
  15. 15. TESTING PROCESS Five methods for testing for syntax and logic error are ● ● ● ● ● 1)Desk checking(code review):careful reading of a printout of the program. 2)Manual testing :using a calculator and sample data to test for correct programming logic. 3)Attempt a translation: running the program using a translator program to identify syntax errors. 4)Testing sample data: running the program and testing the program for logic errors using sample data. 5) Testing by users (beta testing): final step in which potential users try the program and provide feedback.
  16. 16. STEP 5: PROGRAM DOCUMENTATION ● ● Documentation consist of written description and procedures about a program and how to use it Program documentation is carried on throughout all the programming steps
  17. 17. People who use documentation include: Users ● who need to know how to use the program ● some organizations offer training courses ● other expect users to learn from written documentation Operators ● who need to know how to execute the program and how to recognize and correct errors Programmers ● ● who may need to update and maintain the program in the future documentation could include text and program flowchart ,program listings and sample outputs
  18. 18. STEP 6 : PROGRAM MAINTENANCE ● Design to ensure that the program operates correctly, efficiently and effectively ● Two categories of maintenance activities are the following ● 1) Operations -include locating and correcting errors, improving usability and standardizing software. 2)Changing needs -organizations change over time and their programs must change with them starts with core program functionality, then expands until the customer is satisfied with the results. -AGILE DEVELOPMENT
  19. 19. CASE and OOP CASE ● Computer-aided software engineering(CASE) tools provide automation and assistance in program design ,coding and testing. OOP ● ● ● ● Traditional systems development focuses on procedure to complete a specific objective. Object-oriented software development focuses less on procedures and more on defining relationships between previously defined procedures or objects. Object-oriented programming (OOP)- a process by which a program is divided into modules called objects Each object contains both the data and processing operations necessary to perform a task.
  20. 20. GENERATIONS OF PROGRAMMING LANGUAGES
  21. 21.  Programming languages have levels or generations ranging from low to high. 1.Lower-level languages are closer to the 0s and 1s language of computers. 2.Higher-level languages are closer to the languages of human.
  22. 22. Generation Sample statement First : Machine languages 111100100111001111001111111 Second: Assembly languages ADD 210(8,13),02B(4,7) Third: High-level procedural languages If (score> = 90)grade = ‘A’; Fourth: Task-oriented languages SELECT client FROM dailyLog WHERE serviceEnd > 17 Fifth: Problems and constraints languages Get patientDiagnosis from patientSymptoms “sneezing”, “coughing”, “aching”
  23. 23. CARRIERS IN IT
  24. 24.  Computer programmers create, test, and troubleshoot programs.  They also update and repair existing programs  Requirements include a bachelor’s or specialized two-year degree in computer science or information systems.  Salary range is $51,500 to $88,000

×