1.FP201-1.Intro To C++Programming
1.FP201-1.Intro To C++Programming
Explain the history of C++ Illustrate a simple C++ program structure Describe C++ programming development process Develop C++ program using Integrated Development Environment (IDE) Get started with IDE Create a project Create a simple C++ program Compile a C++ program Run a C++ program
C++ (1983)
C++s clarity, extensibility, efficiency and ease of maintenance makes it the language of choice for development of large software projects. used widely in the area of communication, personal file systems and databases.
Greeting Output
Design Program
A framework shows steps in prob.solving Methods : Algorithm - a sequence of instructions (in human language) Flowchart - A graphical symbols to show process Pseudo code half in programming code and half in human language.
Convert an algorithm into a C++. programmin g language - include adequate documentati on, which are comment statements written in your Write program Program code Code
whether performing as planned/ meet the current requirement Edit code to make it more efficient.
For example, some part uses C++ language code and some part use Malay /English language.
What IDE?
An integrated development environment (IDE) a software application that provides comprehensive facilities to computer programmers for software development. All of the tools for writing, compiling and testing code in one place
An IDE normally consists of: a source code editor a compiler and/or an interpreter build automation tools a debugger
Develop C ++ program
Do in lab activities 1
Describe the compiling process of a program Identify the following errors in programming: Syntax/ compile time errors Run time errors Logical errors Identify effective debugging process Debug programs with syntax/ compile time, run time and logical error
2. Converting To Assembly
At this step, many linkers will do final checks to make sure all 3. Linking Machine Code the required pieces, functions, components, etc have been accounted for. Into An Executable
Compiler This is where the "work" is done. High level code is translated into machine code, the result is object files. Linker All object files and relevent resources are linked together. Symbol information is verified (run into a Linker error may be more then once) and an executable is made.
Errors in programming
Logical
Run time Occur when a program errors with no syntax errors asks the computer to do something that the computer is unable to reliably do. Logic errors Logic errors occur when there is a design flaw in your program.
Meaning
Beginning of a comment
( )
{ } " " ;
Used when naming a function Encloses a group of statements Encloses string of characters
End of a programming statement
What is syntax?
Set of rules in programming language.
Debug programs with syntax/ compile time, run time and logical error
Do in lab activities 1