ixa 1234 : c++ programming chapter 1. programming language programming language is a computer...

16
IXA 1234 : C++ PROGRAMMING CHAPTER 1

Upload: mariah-daisy-jenkins

Post on 03-Jan-2016

239 views

Category:

Documents


0 download

TRANSCRIPT

IXA 1234 : C++ PROGRAMMING CHAPTER 1

PROGRAMMING LANGUAGE

Programming language is a computer program that can solve certain problem / task

Keyword: Computer program Solve problem

Example of programming language: C++Java

PROGRAMMING APPROACH

Structured approach: problem is divide into sub problems and then solution is obtained. Solution to all sub problem is combined to solve the overall problem

Object-oriented approach: identify the component (object), determine how the object interact with one another.

EVOLUTION OF PROGRAMMING

Machine Language Sequence of 0 and 1 (binary code)

Assembly Language Middle level language Understand by human

High Level Language Eg: java, C++

LANGUAGE TRANSLATOR

Language translator is a program which translates programs from source language into an equivalent program in an object language

There are 3 type of language translator involved in programming language Interpreter Compiler Assembler

LANGUAGE TRANSLATOR

COMPILER : A program that translates source code into

object code.

LANGUAGE TRANSLATOR

INTERPRETER An interpreter translates high-level instructions

into an immediate form, which it then executes.

LANGUAGE TRANSLATOR

ASSEMBLER A program that translates programs from

assembly language to machine language Example: Intel-----MASM Motorola ------- 68000

PROGRAMMING LIFE CYCLE

Program Analysis

Program Modeling

Program Coding

Program Testing and Debugging

Maintenance

Documentation

PROGRAM ANALYSIS

Clearly define problem

Understand what the system must do

Understand the final output of a system

PROGRAM MODELING

Solution developed using model Three type of modeling:

Algorithm :A formula or set of steps for solving a particular problem

Pseudo code: An outline of a program, written in a form that can easily be converted into real programming statements

Flowchart : Graphical representation of a process, depicting inputs, outputs and unit of activity

PROGRAM MODELING

Program control structure: Sequence While If-then-else Repeat – until For case.

PROGRAM CODING

Write complete program out in programming language such as c++ Write program compile program run program debug program repeat the whole process.

PROGRAM TESTING AND DEBUGGING

Compile the program to detect error Debug is to find the error and fix it After get 0 error and 0 warning then the

program can executed. Run / execute is a same meaning

PROGRAM MAINTENANCE

After all the program compile and run successfully, the program should be maintained.

Any enhancement to the system can be done after the implementation phase

DOCUMENTATION

Documentation is very important in order to enhance system.

Every time report must be completed and get approval.