Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Programing fundamentals with C++
1. Programing Fundamentals with C++
CS-111
Muhammd Farooq
Lecturer in Computer science
GPGC Swabi
farooq3388@gmail.com
2. Basci Concepts of Programing
• Computer Program
• software
• SDLC
• Computer Programing
• Types of Programing languages
• Cataogries of Porgramer
• Types of Traslators
• Source code and Object code
• Fitch-Decode-Execute Cyle
• Phases of Program Execution
• Types of programing errors
3. Basic concepts of C++
• What is C++
• Difference between C & C++
• Brief history of C++
• IDEs for C++
• Online IDEs for C++
• Basic elements of programing languages
• Basic structure of C++
• Course References
5. Computer Program
• A proper sequence of instructions designed to perform a specific task on the
computer is called program
6. What is the difference between
program and Programme
7. Software
Software:
It is a term that includes the following :
1. Set of programs
2. Installation Manual
3. Documentation
Examples:
• MS Word
• Adobe Photoshop
• Calculator
• Windows
• Antivirus
8. Calculator software
Div Program
Mul Program
Sub Program
Add Program
Calculator is a software which consists
of programs (Div, Mul, Sub and Add)
9. Software Development Life Cyle (SDLC)
• SDLC is a process that consists of a series of steps to develop a computer software
• SDLC is also called Sofware Development Process (SDP)
10. Computer Programing
• The act or process of writing programs
• Computer programming is the process of designing and building an executable computer
program for accomplishing a specific computing task.
Programming process: involves
1. Requirements analysis
2. Drawing flowcharts
3. Generating algorithms
4. Implementation of algorithms in a chosen programming language (Coding)
5. Testing & Debugging
6. Documentation
11. What is the difference between
programing and coding
What is the difference between
program and Algorithm
12. Programing Language
• A soruce of communicaton with the computer
• The computer language used to create set of programs
Parts of a Language:
• Syntax: Refers to grammatical structure of the language
• Sementics: Refers to the meanging of the words in the languge
Types:
1. Machine Language
2. Assembly Language
3. High Level Language
14. Machine Language
• Programming language that can be directly understood and executed by a CPU
of computer without conversion (translation)
• consits of 0 and 1
• Also called Binary or low level language
15. Assembly Language
• A programming language that consists of instructions that are mnemonic codes for
corresponding machine language instructions
• Assembler is used to convert assembly language into machine language
• Mnemonics code may be
§ SUM
§ SUB
§ MUL
§ LOAD
§ MOV
16. High Level Language
• The type of programing languge which is easy to understand and similar
english language is called high level language
Examples:
§ C
§ C++
§ Java
§ C#
§ Python
17.
18. 1.Describe brief history of progriaming
languages.
2. What are the generations of programing
languages.
3.What is paradiagm? describe programing
pargdigms.
19. Computer Programer
• A person who is expert to write a program in any programing language
• A person who creates computer software
• Also called software developer or software engineer
Catagoreis
q Windows Applications Developer
q Web Developer
q Mobile Apps Developer
q Games Developer
21. Windows Application Developer
Ø Develop softwares run on windows
Ø Also known as
q Desktop Applications Developer
q Database Developer
Languages
Java, C++,VB.Net, C#, Python
22. Web Developer
Ø Develop websites and web apps
Ø these require web browser to run
languages
HTML, Javascript,C/C++, ASP.NET, PHP,
Python, Ruby
23. Mobile Apps Developer
Ø Develope apps for mobile phone such as
android and iphpne
Languages
Android, Swift (for iOS), Objective C, HTML5,
Java, C#
25. • The type of program used to convert HLL into LLL
• The type of program used to convert source code into equal object code
Types
1. Compiler
2. Interpreter
Translators
29. • The instruction cycle (also known as the fetch–decode–execute cycle or the fetch-
execute cycle)
• It is the basic operational process of a computer system.
• This cycle is repeated continuously by a computer's CPU from boot-up until the
computer has shut down.
Fetch - Decode- Execute Cyle
30. 1.Retrieves a program
instruction from its memory
3. Determines what actions
the instruction describes
2. Carries out those
actions
Fetch - Decode- Execute Cyle
33. Why programing errors are called “Bugs”
What is the difference b/w
tesing & de-bugging
34.
35.
36.
37.
38. What is C++?
• Middle level language: consits of low and high level programing
• General purpose: Used to develop any type of applications like desktop, web and mobile
• Hybrid language: Supports both structural and Object oriented paradigm
• Extension of C: OOP is added to C to enhance it to C++
• Case Sensitive: Smal and Capital letters are considered different
• Compiled language: C++ programs are converted into object code through compiler
40. Difference between C & C ++
S# C C++
1 supports structure programing
paradigm
supports both structure and object
oriented paradigm
2 procedural programing language Object oridented programing language
3 subset of C++ superset of C
4 function overloading not possible function overloading possible
5 namespace not available namesapce avilable
42. Brief history of C++
BCPLB
C
C++
• BCPL was developed by Master Martin Richards
in1967
• B was developed by Ken Thomson in 1969
• C was developed by Dennis Ritche in 1972
• C has many concepts of BCPL & B
• C++ was devloped by BJarnestroustrup in 1979
• First name of C++ was “C with classes”
• The name was changed to C++ in 1983
• C++ is an extension of C language
OOP
+
43. IDEs for C++
• Codeblocks
• Dev C++
• Eclipse
• Visual Studio
44. 1.Code, Compile & Run
2.C++ Shell
3.Visual C++ Compiler Online
4.JDoodle - free Online Compiler
5.Free Online IDE and Terminal
45. Basic Elements of a Programing Language
• Programing enviromnet
• Basic structure
• Data types
• Variables
• Keywords
• Basic operators
• Decision making
• Loops
• Numbers & Characters
• Arrays
• Strings
• Functions
• File Input/Output
46. • Line 1 & Line 2 : pre-processor directives
• Line 3 : Execution begins from main
function
• Line 4 : Start of main body
• Line 5 : Output statement
• Line 6 : Return statement
• Line 7 : End of main body
Basic Structure of C++
47. Course Refernces
• Object Oriented Programing by Robert Lafore
• C++ how to program by Deitel & dietel
• OOP by Aikman series
• C/C++ by Professor Tariq Siddique
• www.CPlusPlus.com
• www.Lerancpp.com
• www.Tutorialspoint.com