INTRODUCTION TO
PROGRAMMING
Dr. Md Rakib Hassan
Associate Professor,
Dept. of Computer Science & Mathematics.
Hardware
2
Four components of a computer system:
CPU - Central Processing Unit
Makes decisions, performs computations, and delegates
input/output requests
Memory: Disk Drives, CD/DVD/Blu-Ray drives, Tape
drives, USB flash drives.
Stores information
Input devices: Keyboard, Mouse, Scanner
Gets information from the user to the computer
Output devices: monitor, speakers
Sends information from computer to the user
Dr. Md. Rakib Hassan
Software
3
Application software
Easy-to-use programs designed to perform
specific tasks
System software
Programs that support the execution and
development of other programs
Two major types
Operating systems
Translation systems (compilers & linkers)
Dr. Md. Rakib Hassan
Software (Cont.)
4
Dr. Md. Rakib Hassan
Computer Software Relationships
5
User Interface Application Programs
User Interface Operating System
User Basic Input and Output Services (BIOS)
Interface • needed for a computer to boot up
Computer Hardware
Application Software
6
Application software makes computer popular
and easy to use
Common application software:
MicrosoftWord, Excel, PowerPoint
Chrome, Mozila, Internet Explorer
VLC media player, iTunes
PhotoShop, Illustrator
Skype, Yahoo Messenger
WinZip, WinRAR, etc.
Dr. Md. Rakib Hassan
Operating System
7
Controls and manages the computing resources
Examples
Windows (8.1, 7, XP, Vista)
Mac OS X (Yosemite, Mountain Lion)
Unix/Linux/Ubuntu
Important services that an operating system provides:
Security: prevent unauthorized users from accessing the system
Commands to manipulate the file system
Input and output on a variety of devices
Window management
Dr. Md. Rakib Hassan
What is a Program?
8
A sequence of instructions
An algorithm A program
(in human language) (in computer language)
A program needs to be written in a language
There are many programming languages
Low-level, understandable by a computer
High-level, needs a translator!
C++ is a high level programming language
Dr. Md. Rakib Hassan
Levels of Programming Language
9
Machine binary language:
Unintelligible
Low-level assembly language
Mnemonic names for machine operations
Explicit manipulation of memory addresses
Machine-dependent
High-level language
Readable
Machine-independent
Dr. Md. Rakib Hassan
Example
10
Machine binary language Low-level assembly High-level
Dr. Md. Rakib Hassan
How to Translate?
11
A program written in high-level programming language
(for example, C++ program)
COMPILER (for example, gcc)
A low-level (machine language) program that is
understandable by a computer (for example, a PC)
Examples of compilers:
gcc (Gnu compiler collection)
Microsoft Visual C++, CodeWarrior
Dr. Md. Rakib Hassan
Translation System
12
Set of programs used to develop software
Types of translators:
Compiler
Linker
Examples
Microsoft Visual C++, gcc
Dr. Md. Rakib Hassan
Software Development Process
13
Major activities
Editing (writing the program)
Compiling (creates .obj file)
Linking with compiled files (creates .exe file)
Object files
Library modules
Loading and executing
Testing the program
Dr. Md. Rakib Hassan
Software Development Process
14
(Cont.)
Dr. Md. Rakib Hassan
IDEs
15
Integrated Development Environments
Combine all of the capabilities that a programmer would want while
developing software
Editor
Compiler
Linker
Loader
Debugger
Viewer
Example IDEs:
CodeBlocks
Eclipse, Microsoft Visual Studio
Dr. Md. Rakib Hassan
What is C++?
16
C is a programming language developed in the 1970's
alongside the UNIX operating system.
C provides a comprehensive set of features for
handling a wide variety of applications, such as
systems development and scientific computation.
C++ is an “extension” of the C language, in that most
C programs are also C++ programs.
C++, as opposed to C, supports “object-oriented
programming.”
Dr. Md. Rakib Hassan
What is C++? (Cont.)
17
C++ is an object-oriented programming
language based on C language
High-level language
IDEs for C++
CodeBlocks
Microsoft Visual C++, Eclipse, NetBeans
Dr. Md. Rakib Hassan
Programming Languages
18
C/C++
Java
Basic
Beginner All-purpose Symbolic Instructional Code
Visual Basic
Basic-like visual language developed by Microsoft
Swift
Apple’s iPhone/iPad/Mac Programming Language
Cobol
Common Business Oriented Language
Fortran
FORmula TRANslation
Pascal
named for Blaise Pascal
Dr. Md. Rakib Hassan
Most Important Features of C++
19
It has strong and efficient support for both
Structured Programming and Object-Oriented
Programming
C++ runs on:
PC
Macintosh (Apple Macs)
Unix workstations
Super computers
Dr. Md. Rakib Hassan
Why C++?
20
C++ and Java are the most widely used
programming languages
You’ll get a job as a software developer if you know
C++/Java very well
Java uses C++ syntax, it is easy to learn Java if
you know C++
You can also learn other languages easily if you know
C++
Computer manufacturers such as Sun, SGI, IBM,
and HP use C++
Many Software companies use C++ to develop
different kinds of software
Dr. Md. Rakib Hassan
Why C++?
21
Mobile Apps Development
Windows Phone
C# (C-Sharp)
Android Phones
Java
iPhones/iPads
Objective-C
Swift
C++, C#, Java, Objective-C, Swift
All are almost similar
So, if you learn C++ well
You can become a very good mobile apps developer, if you want seriously
You can also become a software developer in any other language, with
dedication
It will open the door of outsourcing
Dr. Md. Rakib Hassan
So, Learn C++
22
and become a
Mobile apps developer
Software developer
Freelancer
And of course
Itwill expand your Job market
Increase efficiency in your own fields
Dr. Md. Rakib Hassan
Textbooks
23
The C++ Programming Language (4th Edition)
Bjarne Stroustrup
Schaum’s outlines Programming with C++ (2nd
Edition)
John R. Hubbard
C++ Primer (5th Edition)
Stanley B. Lippman
Dr. Md. Rakib Hassan
Questions???
24 Dr. Md. Rakib Hassan
Course Materials
25
www.mrhacademy.com/cpp
Dr. Md. Rakib Hassan