Programming Fundamentals Lec 1,2.3
Programming Fundamentals Lec 1,2.3
FUNDAMENTALS
BY
MS YOUSRA REHMAN
COURSE OUTLINE
REFERENCE MATERIALS
TABLE OF CONTENTS
• Introduction to computer
• Components of computer
• Characteristics of Computer
• What is program
• Why we need program
• Computer languages
• Language Processors: Assembler, Compiler and Interpreter
• Introduction to object oriented programming
• History of object oriented programming
1. COMPUTER
• The physical parts attached to a computer that form a whole computer are called
hardware or hardware components.
• There can be different types of hardware, depending on the structure.
• Some most common hardware are mouse, keyboard, monitor, printer, etc. These are the
parts that can be seen and touched by humans.
HARDWARE CONT….
3. CHARACTERISTICS OF COMPUTER
• Program is a set of instructions written in a specific programming language that a computer can
execute to perform a specific task or solve a problem
Key components of a program:
1. Syntax: The rules and structure of the programming language.
2. Logic: The sequence of operations or instructions that the program follows to complete its task.
3. Data: Information that the program processes, which could be input by the user or stored in files.
4. Control Structures: Statements that control the flow of the program, like loops, conditionals,
and function calls.
5. WHY WE NEED PROGRAM
• We need programs to automate tasks and solve problems efficiently using computers.
They allow us to control and instruct machines to perform specific functions quickly and
accurately.
• In industry, programming is essential for automating processes, which increases
efficiency and reduces human error in tasks like manufacturing, data management, and
logistics.
6.ALGORITHMS AND PSEUDOCODE
Algorithm
• An algorithm is a systematic, logical approach that provides a step-by-step procedure for
computers to solve a specific problem.
Pseudocode
• Pseudocode is a simplified version of programming codes, written in plain English
language and used to outline a program before its implementation.
ALGORITHMS AND PSEUDOCODE CONT…..
COMPUTER LANGUAGES
7. COMPUTER LANGUAGES
• Computer programs are generally written in high-level languages (like C++, Python, and
Java). A language processor, or language translator, is a computer program that convert
source code from one programming language to another language or to machine code
(also known as object code). They also find errors during translation
TYPES OF LANGUAGE PROCESSORS
c C++
C follows the procedural style programming. C++ is multi-paradigm. It supports both procedural
and object oriented.
Data is less secured in C. In C++, you can use modifiers for class members to
make it inaccessible for outside users.
C follows the top-down approach. C++ follows the bottom-up approach.
C does not support function overloading. C++ supports function overloading.
In C, scanf() and printf() are mainly used for C++ mainly uses stream cin and cout to perform input
input/output. and output operations.
C does not provide the feature of namespace. C++ supports the feature of namespace.
C does not support the inheritance. C++ supports inheritance.
WHAT IS C++
By the help of C++ programming language, we can develop different types of secured and
robust applications:
• Window application
• Client-Server application
• Device drivers
• Embedded firmware etc
C++ PROGRAM
1.#include <iostream>
2.using namespace std;
3.int main() {
4. cout << "Hello C++ Programming";
5. return 0;
HISTORY OF OBJECT ORIENTED PROGRAMMING
• History of C++ language is interesting to know. Here we are going to discuss brief
history of C++ language.
• C++ programming language was developed in 1980 by Bjarne Stroustrup at bell
laboratories of AT&T (American Telephone & Telegraph), located in U.S.A.
• Bjarne Stroustrup is known as the founder of C++ language.
• It was develop for adding a feature of OOP (Object Oriented Programming) in C
without significantly changing the C component.
HISTORY OF OBJECT ORIENTED
PROGRAMMING
CONT…
• C++ Developer
PROGRAMMING LANGUAGES THAT WERE
DEVELOPED BEFORE C++ LANGUAGE.
languages year Develop by
Agol 1990 International Group
BCPL 1967 Martin Richard
B 1970 Ken Thompson
Traditional C 1972 Dennis Ritchie
K & RC 1978 Kernighan & Dennis Ritchie
C++ 1980 Bjarne Stroustrup