Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
Introduction to C++
Basic and Advanced
Concepts
Lecture No. 1
My Email Address
adilaslam5959@gmail.com
Introduction to C++...
About Me
Introduction to C++
Lecture Slides By Adil Aslam
i am Student of BSCS
My email address:
adilaslam5959@gmail.com
Introduction to C++
Introduction to C++
Lecture Slides By Adil Aslam
Course Contents
• Variables in C++
• Data Types in C++
• Operators in C++
• sizeof and typedef in C++
• Selection / Multip...
Course Contents
• Recursion in C++
• Type of Recursion
• Arrays in C++
• Two Dimensional Arrays
• Three Dimensional Arrays...
Course Contents
• Inheritance in C++
• Type of Inheritance
• Polymorphism in C++
• Type of Polymorphism
• Operator Overloa...
Course Contents
• Type Conversion in C++
• Template in C++
• Exception Handling in C++
• File Handling in C++
• Explicit a...
Importance of this Course
• Core of Computer Science
• Many courses depend on this course
• Object Oriented Programming
• ...
Text Book
• Book Name:
• C++ How to Program, 8th
Edition
• Author:
• Paul Deitel, Harvey Deitel
• Publishers:
• Prentice H...
Text Book
• Book Name:
• C++: The Complete
Reference, 4th Edition
• Author:
• Herbert Schildt
• Publishers:
• McGraw-Hill ...
In This Lecture We Learn
• What is a Computer?
• Computer Architecture
• Why Programming?
• Programming Languages
• C++ as...
What is a Computer?
• A computer is a device that can perform
computations and make logical decisions
phenomenally faster ...
Computer Working
Introduction to C++
Lecture Slides By Adil Aslam
Computer Working
Introduction to C++
Lecture Slides By Adil Aslam
Input Devices Output Devices
Computer Architecture
• The modern day computer has two major
classifications:
• Software
• Hardware
Introduction to C++
L...
Computer Architecture
• There are two main categories of software
• System software
• Application Software
Introduction to...
Computer Architecture
• There are two main categories of software
• System software
• Application Software
Introduction to...
Computer Architecture
Introduction to C++
Lecture Slides By Adil Aslam
Application Software
Computer Games Database intern...
Computer Program
• A program is a set of instructions in proper
sequence, that causes a computer to perform a
particular t...
What is Software?
• A computer is an electronic machine that can
process data. But it needs to be told what to do in
the f...
Computer Program (Software)
• A sequence of instructions is called a computer
program or software.
• Operating systems, Ap...
Software Programming
• For Software development
• All development is done in some programming
language.
Introduction to C+...
Computer Architecture(System Software)
• The system software controls the computer.
• It communicates with computer’s hard...
System Software Types(Operating System)
• An operating system (sometimes abbreviated as "OS")
is the program that manages ...
Operating System Tasks
• Memory management – organising the memory
• Multi-tasking – allowing several programs to run at
t...
User interface
• A user interface is part of the systems software.
• People need a way of interacting with machines
such a...
User interface Example
Introduction to C++
Lecture Slides By Adil Aslam
User interface Example
Introduction to C++
Lecture Slides By Adil Aslam
System Software Types(Utility Software)
• Utility software is a program that performs a very specific
task, usually relate...
• Similarly there is another utility, Disk Defragmentation
which is used to defragment the disk. The data is stored on
the...
Utility Programs
• Some common tasks carried out by utility programs
are:
• File compression
• File sorting
• File renamin...
Drivers
• A driver is another essential piece of system software
• A driver is a specially written program which translate...
Drivers (cont.)
• When a new operating system such as Windows 10 is first
released, the software developers will have been...
Computer Architecture(Application Software)
• A program or group of programs designed for end
users.
• For example a progr...
Application Software
• Applications software is different to systems software.
• They allow you to do your every day tasks...
Installing and Running Programs
• Installing is the process of setting up software to
work with the computer, printer, and...
Software Development
• A programmer, sometimes called a developer, is
someone who develops software or writes the
instruct...
Application Software
• Application software consists of programs
designed to make users more productive and/or
assist them...
Four Categories of Application Software
• 1. Business
• 2.Graphics and Multimedia
• 3. Home/personal/Educational
• 4. Comm...
Business Software
• Business software is application software that
assists people in becoming more effective and
efficient...
Word Processing
• Word processing software, sometimes called a word
processor, allows users to create and manipulate
docum...
Examples of Word Processing
• Microsoft Word
• Apple Pages
• Corel WordPerfect
Introduction to C++
Lecture Slides By Adil ...
Spreadsheet Software
• Allows users to organize data in rows and columns
and perform calculations on the data. These rows
...
Database Software
• A database is a collection of data organized in a manner
that allows access, retrieval, and use of tha...
Database Software
• With most personal computer database programs,
a database consists of a collection of tables,
organize...
Presentation Software
• Is application software that allows users to create
visual aids for presentations to communicate i...
Presentation Software
• In addition, you can enhance any text, charts, and
graphical images on a slide with 3-D, animation...
Presentation Software
• Examples:
• Microsoft Powerpoint
• Apple Keynote
• Impress
• Corel Presentations
Introduction to C...
Note Taking Software
• Note taking software is application software that
enables users to enter typed text, handwritten
co...
Note Taking Software
• Examples:
• Microsoft OneNote
• Agilix GoBinder
• Corel Grafigo
• SnapFiles KeyNote
Introduction to...
Project Management Software
• Allows a user to plan, schedule, track, and analyze
the events, resources, and costs of a pr...
Project Management Software
• Examples:
• CS Odessa ConceptDraw PROJECT
• Microsoft Project
• Oracle Primavera SureTrak
• ...
Accounting Software
• Accounting software helps companies record and
report their financial transactions.
• With accountin...
Accounting Software
• The cost of accounting software for small
businesses ranges from less than one hundred to
several th...
Document Management Software
It provides a means for sharing, distributing, and
searching through documents by converting ...
Document Management Software
• Examples:
• Adobe Acrobat
• Enfocus PitStop
• Nuance PDF Converter
Introduction to C++
Lect...
Graphics And Multimedia Software
• Many people work with software designed
specifically for their field of work. Power use...
Computer-Aided Design
• is a sophisticated type of application software that
assists a professional user in creating engin...
Desktop Publishing Software
• Enables professional designers to create
sophisticated documents that contain text,
graphics...
Desktop Publishing Software
• Examples:
• Adobe InDesign
• Corel Ventura
• Quark QuarkXPress
Introduction to C++
Lecture S...
Paint/Image Editing Software
• Paint software, also called illustration software,
allows users to draw pictures, shapes, a...
Paint/Image Editing Software
• Examples:
• Adobe Illustrator
• Corel Painter
• Microsoft Expression Design
• Photo Editing...
Video and Audio Editing Software
• Video editing software allows professionals to
modify a segment of a video, called a cl...
Video and Audio Editing Software
• Examples:
• Adobe Audition, Premiere Pro, Soundbooth
• Avid Technology Avid Media Compo...
Web Page Authoring Software
• Helps users of all skill levels create Web pages that
include graphical images, video, audio...
Web Page Authoring Software
• Examples:
• Adobe Dreamweaver
• Adobe Fireworks
• Adobe Flash
• Microsoft Expression Web
• M...
Tax Preparation Software
• Tax preparation software, which is available both as
packaged software and Web applications, ca...
Tax Preparation Software
• Examples:
• 2nd Story Software TaxACT
• H&R Block TaxCut
• Intuit TurboTax
Introduction to C++
...
Desktop Publishing Software
• Personal DTP software helps home and small
business users create newsletters, brochures, fly...
Desktop Publishing Software
• Examples:
• Broderbund The Print Shop
• PrintMaster
• Microsoft Publisher
Introduction to C+...
Photo Management Software
• Photo management software, you can view,
organize, sort, catalog, print, and share digital
pho...
System Software VS. Application Software
Introduction to C++
Lecture Slides By Adil Aslam
Application and System Software Working
Introduction to C++
Lecture Slides By Adil Aslam
A diagram showing how
the user in...
Operating Systems Components
• Kernel
• With the aid of the firmware and device drivers, the
kernel provides the most basi...
Operating Systems Components
• Program Execution
• The operating system provides an interface between an
application progr...
Operating Systems Components
Introduction to C++
Lecture Slides By Adil Aslam
A kernel connects the application software t...
Why Programming?
• Our civilization runs on software:
• Most engineering activities involve software
• Programming is impo...
Ships
• Design
• Construction
• Management
 Monitoring
 Engine
Introduction to C++
Lecture Slides By Adil Aslam
Aircraft
• Communication
• Control
• Display
 Signal processing
 “Gadget” control
 Monitoring
Introduction to C++
Lectu...
Mobile Phones
• Voice quality
• User interfaces
• Billing
• Mobility
Introduction to C++
Lecture Slides By Adil Aslam
Computer Hardware's
• A computer consists of various devices referred to
as hardware (e.g., the keyboard, screen, mouse,
h...
Programming Languages
• Programmers write instructions in various
programming languages, some directly understand
able by ...
Machine Language
• Written in the form of 0 & 1
• Any computer can directly understand only its own
machine language, defi...
Assembly Languages
• It is a low level language
• Use Naturally understandable symbols called
“Mnemonics”
• Example: Load ...
Assembly vs. Machine Language
Assembly Language Machine code
SUB AX , BX 01010101011
MOV CX , AX 01010101010
MOV DX , 0 11...
High Level Languages
• Use naturally understandable language
• Compilers are used as interpreter
• IDE’s are use for rapid...
Procedural Languages
• Procedural programming is a list or set of instructions
telling a computer what to do step by step ...
Object Oriented Language
• Object-oriented programming (OOP) is
a programming paradigm based on the concept of
"objects", ...
C++ Procedure Oriented Programming POP's
• High level languages such as COBOL, FORTRAN and C, is
commonly known as procedu...
Characteristics of Procedure Oriented Programming
• C++ is an Object Oriented Programming Language
(OOPL).
• C++ have huge...
Procedural VS. Object Oriented
Introduction to C++
Lecture Slides By Adil Aslam
Procedural Object Oriented
Early High Leve...
Procedural VS. Object Oriented
Introduction to C++
Lecture Slides By Adil Aslam
Procedural:
Top down design
Global data fo...
C++ as a Programming Language
• Extended version of C language
• C is Evolved by Dennis Ritchie
• C++ is developed by Bjar...
C++ as a Programming Language
• Extended version of C language
• C is Evolved by Dennis Ritchie
• C++ is developed by Bjar...
Some History of C++
• C++ is a computer programming language
developed in 1980 by Bjarne Trustful at the Bell
Telephone La...
Why C++
• Mother of almost all programming languages
• You can’t learn to program without a programming
language
• The pur...
Where We Use C++ Language
• C++ Language is mainly used for:
• Design Operating system
• Design Language Compiler
• Design...
Some C++ Features
• C++ is C. C++ supports (almost) all the features of C.
Like C, C++ allows programmers to manage the
me...
C++ Strength and Pitfall
• C++ is a powerful language for high-performance
applications, including writing operating syste...
Features of C++
Introduction to C++
Lecture Slides By Adil Aslam
Features of C++
• Simple
• Portability
• Powerful
• Platform dependent
• Object Oriented Language
• Case sensitive
• Compi...
Features of C++
• Simple
• Every C++ program can be written in simple English
language so that it is very easy to understa...
Features of C++
• Platform Dependent
• A language is said to be platform dependent
whenever the program is execute in the ...
Features of C++
• Portability
• It is the concept of carrying the instruction from one
system to another system. In C++ La...
Features of C++
• Case Sensitive
• C++ is a case sensitive programming language. In C++
programming 'break and BREAK' both...
Features of C++
• Syntax Based Language
• C++ is a strongly tight syntax based programming
language. If any language follo...
Applications of C++
• Mainly C++ Language is used for Develop Desktop
application and system software. Some application of...
Benefits of C++ Over C Language
• The major difference being OOPS concept, C++ is
an object oriented language whereas C la...
Benefits of C++ Over C Language
• There is Stronger Type Checking in C++.
• All the OOPS features in C++ like Abstraction,...
Difference Between C and C++
Introduction to C++
Lecture Slides By Adil Aslam
C C++
C is the function or procedure
program...
Difference Between C and C++
Introduction to C++
Lecture Slides By Adil Aslam
C C++
In this programming, programs are
divi...
Tools of the Trade
• As programmer we need different tools to develop
a program. These tools are needed for the life cycle...
Tools of the Trade
• Editors
• First of all we need a tool for writing the code of a
program. For this purpose we used.
• ...
Compiler and Interpreter
• As we write the code in English and we know that
computers can understand only 0s and1s. So we
...
Interpreters
• Interpreters translates the program line by line
meaning it reads one line of program and translates it,
th...
Compilers
• Compilers also translate the English like language
(Code written in C) into a language (Machine
language) whic...
Compilers
• A compiler is system software which converts
programming language code into binary format in
single steps. In ...
Assembler
• An assembler is system software which is used to
convert the assembly language instruction into
binary format ...
Interpreters vs. Compilers
• The difference between interpreter and compiler is
that compiler will stop translating if it ...
Difference Between Compiler Interpreter
Introduction to C++
Lecture Slides By Adil Aslam
Compiler Interpreter
Compiler tak...
Development Environment
• Using a Complier
• A compiler is a computer program (or set of
programs) that transforms source ...
Development Environment
• We Recommend the following Complier for C++
Programming.
• Bloodshed Dev-C++ (V_5.11)
Introducti...
Bloodshed Dev-C++ Installation
• Download Dev C++ With Latest Version.
• After Click .exe File for Installation
• Then You...
Bloodshed Dev-C++ Installation
• After You can Seen this Type of Screen
• Click Ok
Introduction to C++
Lecture Slides By A...
Bloodshed Dev-C++ Installation
• Click “I Agree”
Introduction to C++
Lecture Slides By Adil Aslam
Bloodshed Dev-C++ Installation
• Click “Next”
Introduction to C++
Lecture Slides By Adil Aslam
Bloodshed Dev-C++ Installation
• Click “Install”
Introduction to C++
Lecture Slides By Adil Aslam
Bloodshed Dev-C++ Installation
• Then Click “Finish”
Introduction to C++
Lecture Slides By Adil Aslam
Bloodshed Dev-C++ Installation
• After Click “Next”
Introduction to C++
Lecture Slides By Adil Aslam
Bloodshed Dev-C++ Installation
• Then click again “Next”
Introduction to C++
Lecture Slides By Adil Aslam
Bloodshed Dev-C++ Installation
• Click “Ok”
Introduction to C++
Lecture Slides By Adil Aslam
Create a New Project
• For New Project/Program Click Like this
Introduction to C++
Lecture Slides By Adil Aslam
Create a New Project
• After Click “Console Application” and click “Ok”
Introduction to C++
Lecture Slides By Adil Aslam
Y...
Create a New Project
Introduction to C++
Lecture Slides By Adil Aslam
This is the screen
where you can start
coding of you...
Compilation of Program
• For Compile your program Press “F11” or Fellow
this
Introduction to C++
Lecture Slides By Adil As...
Error Correction
• For Error Correction Follow Like this
Introduction to C++
Lecture Slides By Adil Aslam
Missing
Semicolo...
Typically C++ Development Environment
• C++ programs typically go through six phases:
1. Edit
2. Preprocess
3. Compile
4. ...
Phase 1: Creating a Program
• Phase 1consists of editing a file with an editor
program , normally known simply as an edito...
Phase 2: Preprocessing a C++ Program
• In Phase 2 ,you give the command to compile the
program.
• In a C++ system , a prep...
Phase3: Compiling a C++ Program
• In Phase 3, the compiler translates the C++ program
in to machine-language code—also ref...
Phase4: Linking
• A linker links the object code with the code for the
missing functions to produce an executable
program
...
Phase5: Loading
• Phase 5 is called loading. Before a program can be
executed, it must first be placed in memory.
• This i...
Phase5: Loading
Introduction to C++
Lecture Slides By Adil Aslam
Phase6: Execution
• Finally, the computer , under the control of its CPU,
executes the program one instruction at a time
•...
C++ OOP's ( Object Oriented Programming )
• Object Oriented Programming is a programming in
which we design and develop ou...
Features of OOP's ( Object Oriented Programming )
Introduction to C++
Lecture Slides By Adil Aslam
Features of OOP's ( Object Oriented Programming )
• Class : Class is an encapsulation of data and coding.
Classes are an e...
Features of OOP's ( Object Oriented Programming )
• Polymorphism : Polymorphism means more than one
function with same nam...
Features of OOP's ( Object Oriented Programming )
• Encapsulation : Encapsulation is a process of
wrapping data members an...
C++ Benefits of OOP's
• Through inheritance, we can eliminate redundant code
and extend the use of existing classes which ...
C++ Benefits of OOP's
• It is possible to map objects in the problem domain
to those in the program.
• It is easy to parti...
In Upcoming Lecture We Learn
• Sample Program
• Program Structure
• Semicolons and Blocks in C++
• Comments in C++
• Varia...
What is Open Source Software?
• In Software terms, open source refers to a
software which has it’s source code freely avai...
What is Closed Source Software?
• Closed source software can be defined as proprietary
software distributed under a licens...
Open Source VS. Closed Source Softwares
Introduction to C++
Lecture Slides By Adil Aslam
Próxima SlideShare
Cargando en…5
×

Introduction To C++ Lecture No. 1

What is a Computer?
Computer Architecture
Computer Program
What is Software?
System Software
System Software Types(Operating System)
Operating System Tasks
User interface
System Software Types(Utility Software)
Drivers
Application Software
Installing and Running Programs
Software Development
Four Categories of Application Software
Business Software
Operating Systems Components
System Software VS. Application Software
Why Programming?
Programming Languages
Machine Language
Assembly Languages
Assembly vs. Machine Language
Procedural Languages
C++ Procedure Oriented Programming POP's
Procedural VS. Object Oriented
Some History of C++
Where We Use C++ Language
Features of C++
Applications of C++
Benefits of C++ Over C Language
Difference Between C and C++
Compiler and Interpreter
Interpreters vs. Compilers
Bloodshed Dev-C++ Installation
Typically C++ Development Environment
Features of OOP's
C++ Benefits of OOP's

  • Inicia sesión para ver los comentarios

Introduction To C++ Lecture No. 1

  1. 1. Introduction to C++ Basic and Advanced Concepts Lecture No. 1 My Email Address adilaslam5959@gmail.com Introduction to C++ Lecture Slides By Adil Aslam
  2. 2. About Me Introduction to C++ Lecture Slides By Adil Aslam i am Student of BSCS My email address: adilaslam5959@gmail.com
  3. 3. Introduction to C++ Introduction to C++ Lecture Slides By Adil Aslam
  4. 4. Course Contents • Variables in C++ • Data Types in C++ • Operators in C++ • sizeof and typedef in C++ • Selection / Multiple Selection in C++ • Iterations/Loops in C++ • Built-in Functions in C++ • User-defined Functions in C++ • Inline Functions in C++ • Function Overloading in C++ Introduction to C++ Lecture Slide By Adil Aslam
  5. 5. Course Contents • Recursion in C++ • Type of Recursion • Arrays in C++ • Two Dimensional Arrays • Three Dimensional Arrays • Pointers in C++ • Class String in C++ • Dynamic Memory Allocation in C++ • Classes in C++ • Constructor/Destructor in C++ • Storage Classes in C++ Introduction to C++ Lecture Slides By Adil Aslam
  6. 6. Course Contents • Inheritance in C++ • Type of Inheritance • Polymorphism in C++ • Type of Polymorphism • Operator Overloading in C++ • Encapsulation in C++ • Friend Functions in C++ • Friend Classes in C++ • Virtual Functions in C++ • Pure Virtual Functions in C++ Introduction to C++ Lecture Slides By Adil Aslam
  7. 7. Course Contents • Type Conversion in C++ • Template in C++ • Exception Handling in C++ • File Handling in C++ • Explicit and Mutable keywords in C++ • Preprocessor Directive in C++ • Manipulating Strings in Detail • Namespace in C++ • Standard Template Library in C++ • Some New Features in C++ Introduction to C++ Lecture Slides By Adil Aslam
  8. 8. Importance of this Course • Core of Computer Science • Many courses depend on this course • Object Oriented Programming • Data Structures • Advance Programming Techniques • Computer Graphics • ……. Introduction to C++ Lecture Slides By Adil Aslam
  9. 9. Text Book • Book Name: • C++ How to Program, 8th Edition • Author: • Paul Deitel, Harvey Deitel • Publishers: • Prentice Hall Introduction to C++ Lecture Slides By Adil Aslam
  10. 10. Text Book • Book Name: • C++: The Complete Reference, 4th Edition • Author: • Herbert Schildt • Publishers: • McGraw-Hill Education Introduction to C++ Lecture Slides By Adil Aslam
  11. 11. In This Lecture We Learn • What is a Computer? • Computer Architecture • Why Programming? • Programming Languages • C++ as a Programming Language • Why C++ • Features of C++ • Development Environment • Bloodshed Dev-C++ Installation • Typically C++ Development Environment Introduction to C++ Lecture Slides By Adil Aslam
  12. 12. What is a Computer? • A computer is a device that can perform computations and make logical decisions phenomenally faster than human beings can. • Many of today’s personal computers can perform billions of calculations in one second—more than a human can perform in a lifetime. • Supercomputers are already performing thousands of trillions(quadrillions) of instructions per second! Introduction to C++ Lecture Slides By Adil Aslam
  13. 13. Computer Working Introduction to C++ Lecture Slides By Adil Aslam
  14. 14. Computer Working Introduction to C++ Lecture Slides By Adil Aslam Input Devices Output Devices
  15. 15. Computer Architecture • The modern day computer has two major classifications: • Software • Hardware Introduction to C++ Lecture Slides By Adil Aslam
  16. 16. Computer Architecture • There are two main categories of software • System software • Application Software Introduction to C++ Lecture Slides By Adil Aslam
  17. 17. Computer Architecture • There are two main categories of software • System software • Application Software Introduction to C++ Lecture Slides By Adil Aslam
  18. 18. Computer Architecture Introduction to C++ Lecture Slides By Adil Aslam Application Software Computer Games Database internet Browsers System Software Operating Systems Utilities program Hardware CPU Disks Mouse Printers
  19. 19. Computer Program • A program is a set of instructions in proper sequence, that causes a computer to perform a particular task. • These programs guide the computer through orderly sets of actions specified by people called computer programmers. • The programs that run on a computer are referred to as software. Introduction to C++ Lecture Slides By Adil Aslam
  20. 20. What is Software? • A computer is an electronic machine that can process data. But it needs to be told what to do in the form of a set of instructions. These instructions are called a 'software program'. • Software allows the hardware to do something useful; without software, the hardware wouldn't know what it was supposed to do. So software depends on hardware and hardware depends on software. Together they form a computer system. • Software programs are stored as files on a storage device such as the hard disk, DVD or memory sticks. • When they need to run, they are loaded into the computer's memory (RAM). Introduction to C++ Lecture Slides By Adil Aslam
  21. 21. Computer Program (Software) • A sequence of instructions is called a computer program or software. • Operating systems, Application software, games etc. • These instructions are written in a Programming Language. Introduction to C++ Lecture Slides By Adil Aslam
  22. 22. Software Programming • For Software development • All development is done in some programming language. Introduction to C++ Lecture Slides By Adil Aslam
  23. 23. Computer Architecture(System Software) • The system software controls the computer. • It communicates with computer’s hardware (key board, mouse, modem, sound card etc.) and controls different aspects of operations. • System software serves as the interface between the user, the application software, and the computer’s hardware. • Sub categories of system software are: o Operating system o Utilities Introduction to C++ Lecture Slides By Adil Aslam
  24. 24. System Software Types(Operating System) • An operating system (sometimes abbreviated as "OS") is the program that manages all the other programs in a computer. • It is a integrated collection of routines that service the sequencing and processing of programs by a computer. • Note: An operating system may provide many services, such as resource allocation, scheduling, input/output control, and data management. • Many of today’s computers use Microsoft’s Windows or Mac OS, Apple’s operating system. Introduction to C++ Lecture Slides By Adil Aslam
  25. 25. Operating System Tasks • Memory management – organising the memory • Multi-tasking – allowing several programs to run at the same time • Providing basic security – like logins and file user rights. • Sorting out where to store data on disk drives • Dealing with saving, deleting, opening, closing files • Organizing files and folders • Managing data transfer from the CPU to the peripherals e.g. printer, monitor Introduction to C++ Lecture Slides By Adil Aslam
  26. 26. User interface • A user interface is part of the systems software. • People need a way of interacting with machines such as computers, notebooks, mobile phones, cash machines (ATMs) etc. • A user interface is the software that enables a user to provide instructions to, interact with and control a computer or device e.g. a mobile phone. • The user interface is often part of the operating system. Introduction to C++ Lecture Slides By Adil Aslam
  27. 27. User interface Example Introduction to C++ Lecture Slides By Adil Aslam
  28. 28. User interface Example Introduction to C++ Lecture Slides By Adil Aslam
  29. 29. System Software Types(Utility Software) • Utility software is a program that performs a very specific task, usually related to managing system resources. • Utility programs are designed to do one or two specific but vital tasks very well. • Some utility programs might be supplied as part of the operating system, others are purchased separately. • You would have noticed a utility of Disk Compression. • Whenever you write a file and save it to the disk, Compression Utility compresses the file (reduce the file size) and write it to the disk and when you request this file from the disk, the compression utility uncompressed the file and shows its contents. Introduction to C++ Lecture Slides By Adil Aslam
  30. 30. • Similarly there is another utility, Disk Defragmentation which is used to defragment the disk. The data is stored on the disks in chunks, so if we are using several files and are making changes the these files then the different portions of file are saved on different locations on the disk. • These chunks are linked and the operating system knows how to read the contents of file from the disk combining all the chunks. Similarly when we delete a file then the place where that file was stored on the disk is emptied and is available now to store other files. • As the time goes on, we have a lot of empty and used pieces on the disk. In such situation we say that the disk is fragmented now. If we remove this fragmentation the chunks of data on the disk will be stored close to each other and thus reading of data will be faster. • For the purpose of removing fragmentation on the disk the Defragmentation utility is used. Introduction to C++ Lecture Slides By Adil Aslam
  31. 31. Utility Programs • Some common tasks carried out by utility programs are: • File compression • File sorting • File renaming • File conversion (e.g. convert a sound file to MP3) • File repair • Disk defragmentation (defragging) • Printing jobs • Backing up data • Anti-virus checks • Note that a utility program only does one or perhaps two of these. Introduction to C++ Lecture Slides By Adil Aslam
  32. 32. Drivers • A driver is another essential piece of system software • A driver is a specially written program which translates the commands from the operating system into commands that the hardware will understand. • Each piece of hardware e.g. printer, monitor, scanner, keyboard etc will have its own driver. Printers from different manufacturers work in different ways, so a printer from manufacturer A will need a different driver than printer from manufacturer B. • If you try to use a device without the correct driver, then it probably won’t work. If you do manage to get your new printer working without installing its driver, it will probably just print gobbledygook! Introduction to C++ Lecture Slides By Adil Aslam
  33. 33. Drivers (cont.) • When a new operating system such as Windows 10 is first released, the software developers will have been working closely with the hardware manufacturers and so the operating system will contain all of the drivers needed for the hardware currently on the market. • However, operating systems are only released every 3-4 years and so the operating system will not contain the drivers for any new hardware developed after its release. • When you buy a new piece of hardware, it will usually come with an installation disk which will load the new drivers into the operating system. Very often, you can also download the drivers from the internet. • Drivers also need to be updated on a regular basis because bugs can be found in the software and as they are found, the developers release a patch or fix. Also, they might release patches which optimise the way the driver works. Introduction to C++ Lecture Slides By Adil Aslam
  34. 34. Computer Architecture(Application Software) • A program or group of programs designed for end users. • For example a program for Accounting, Payroll, Inventory Control System, and guided system for planes. • GPS (global positioning system), another application software, is being used in vehicles, which through satellite determines the geographical position of the vehicle Introduction to C++ Lecture Slides By Adil Aslam
  35. 35. Application Software • Applications software is different to systems software. • They allow you to do your every day tasks on a computer such as writing a letter, sending an email, making a poster or downloading a web page • Software applications work through the operating system to gain access to the hardware. • Typical software applications that you might use are: • Word processors, for example, Microsoft Word or the free OpenOffice Writer • Spreadsheet software, for example, Microsoft Excel or OpenOffice Calc • Graphics software, for example, Microsoft Paint, Adobe Photoshop, Corel Paintshop Pro • Web design software, for example, Adobe Dreamweaver Introduction to C++ Lecture Slides By Adil Aslam
  36. 36. Installing and Running Programs • Installing is the process of setting up software to work with the computer, printer, and other hardware. When you buy a computer, it usually has some software preinstalled on its hard disk. • To begin installing additional software from an optical disc, insert the program disc in an optical disc drive. To install downloaded software, the Web site typically provides instructions for how to install the program on your hard disk. • To begin installing additional software from an optical disc, insert the program disc in an optical disc drive. To install downloaded software, the Web site typically provides instructions for how to install the program on your hard disk. Introduction to C++ Lecture Slides By Adil Aslam
  37. 37. Software Development • A programmer, sometimes called a developer, is someone who develops software or writes the instructions that direct the computer to process data into information. • Complex programs can require thousands to millions of instructions. • Programmers use a programming language or program development tool to create computer programs. Introduction to C++ Lecture Slides By Adil Aslam
  38. 38. Application Software • Application software consists of programs designed to make users more productive and/or assist them with personal tasks. • Application software has a variety of uses: • 1. To make business activities more efficient • 2. To assist with graphics and multimedia projects • 3. To support home, personal, and educational tasks • 4. To facilitate communications Introduction to C++ Lecture Slides By Adil Aslam
  39. 39. Four Categories of Application Software • 1. Business • 2.Graphics and Multimedia • 3. Home/personal/Educational • 4. Communications Introduction to C++ Lecture Slides By Adil Aslam
  40. 40. Business Software • Business software is application software that assists people in becoming more effective and efficient while performing their daily business activities. • Business software includes programs such as word processing, spreadsheet, database, presentation, note taking, personal information manager, business software for phones, business software suites, project management, accounting, document management, and enterprise computing software. Introduction to C++ Lecture Slides By Adil Aslam
  41. 41. Word Processing • Word processing software, sometimes called a word processor, allows users to create and manipulate documents containing mostly text and sometimes graphics. • Millions of people use word processing software every day to develop documents such as letters, memos, reports, mailing labels, newsletters, and Web pages. • A major advantage of using word processing software is that users easily can change what they have written. Word processing software also has many features to make documents look professional and visually appealing. For example, you can change the shape, size, and color of characters; apply special effects such as three-dimensional shadows. Introduction to C++ Lecture Slides By Adil Aslam
  42. 42. Examples of Word Processing • Microsoft Word • Apple Pages • Corel WordPerfect Introduction to C++ Lecture Slides By Adil Aslam
  43. 43. Spreadsheet Software • Allows users to organize data in rows and columns and perform calculations on the data. These rows and columns collectively are called a worksheet . • Most spreadsheet software has basic features to help users create, edit, and format worksheets. • Examples of Spreadsheet • Microsoft Excel • OpenOffice Calc • AppleNumbers Introduction to C++ Lecture Slides By Adil Aslam
  44. 44. Database Software • A database is a collection of data organized in a manner that allows access, retrieval, and use of that data. In a manual database, you might record data on paper and store it in a filing cabinet. • With a computerized database, the computer stores the data in an electronic format on a storage medium such as a hard disk. • Database software is application software that allows users to create, access, and manage a database. • Using database software, you can add, change, and delete data in a database; sort and retrieve data from the database; and create forms and reports using the data in the database. Introduction to C++ Lecture Slides By Adil Aslam
  45. 45. Database Software • With most personal computer database programs, a database consists of a collection of tables, organized in rows and columns. Each row, called a record, contains data about a given person, product, object, or event. Each column, called a field, contains a specific category of data within a record. • Example of Database Software: Corel Paradox Microsoft Access Sun MYSQL Introduction to C++ Lecture Slides By Adil Aslam
  46. 46. Presentation Software • Is application software that allows users to create visual aids for presentations to communicate ideas, messages, and other information to a group. The presentations can be viewed as slides, sometimes called a slide show, that are displayed on a large monitor or on a projection screen. • Presentation software typically provides a variety of predefined presentation formats that define complementary colors for backgrounds, text, and graphical accents on the slides. • This software also provides a variety of layouts for each individual slide such as a title slide, a two- column slide, and a slide with clip art, a chart, a table, or a diagram. Introduction to C++ Lecture Slides By Adil Aslam
  47. 47. Presentation Software • In addition, you can enhance any text, charts, and graphical images on a slide with 3-D, animation, and other special effects such as shading, shadows, and textures. • When building a presentation, users can set the slide timing so that the presentation automatically displays the next slide after a preset delay. • Presentation software allows you to apply special effects to the transition between slides. One slide, for example, might fade away as the next slide appears. Introduction to C++ Lecture Slides By Adil Aslam
  48. 48. Presentation Software • Examples: • Microsoft Powerpoint • Apple Keynote • Impress • Corel Presentations Introduction to C++ Lecture Slides By Adil Aslam
  49. 49. Note Taking Software • Note taking software is application software that enables users to enter typed text, handwritten comments, drawings, or sketches anywhere on a page and then save the page as part of a notebook. • Users also can include audio recordings as part of their notes. Users find note taking software convenient during meetings, class lectures conferences, in libraries, and other settings that previously required a pencil and tablet of paper for recording thoughts and discussions. Introduction to C++ Lecture Slides By Adil Aslam
  50. 50. Note Taking Software • Examples: • Microsoft OneNote • Agilix GoBinder • Corel Grafigo • SnapFiles KeyNote Introduction to C++ Lecture Slides By Adil Aslam
  51. 51. Project Management Software • Allows a user to plan, schedule, track, and analyze the events, resources, and costs of a project. • Project management software helps users manage project variables, allowing them to complete a project on time and within budget. • A customer service manager might use project management software to schedule the process of administering customer surveys, evaluating responses, and presenting recommendations. Introduction to C++ Lecture Slides By Adil Aslam
  52. 52. Project Management Software • Examples: • CS Odessa ConceptDraw PROJECT • Microsoft Project • Oracle Primavera SureTrak • Project Manager Introduction to C++ Lecture Slides By Adil Aslam
  53. 53. Accounting Software • Accounting software helps companies record and report their financial transactions. • With accounting software, business users perform accounting activities related to the general ledger, accounts receivable, accounts payable, purchasing, invoicing, and payroll functions. Accounting software also enables business users to write and print checks, track checking account activity, and update and reconcile balances on demand. Introduction to C++ Lecture Slides By Adil Aslam
  54. 54. Accounting Software • The cost of accounting software for small businesses ranges from less than one hundred to several thousand dollars. • Accounting software for large businesses can cost several hundred thousand dollars. • Examples: • Intuit QuickBooks • Microsoft Accounting • Sage Software Peachtree Introduction to C++ Lecture Slides By Adil Aslam
  55. 55. Document Management Software It provides a means for sharing, distributing, and searching through documents by converting them into a format that can be viewed by any user. • A popular file format that document management • Software uses to save converted documents is PDF (Portable Document Format), developed by Adobe Systems. To view and print a PDF file, you need Acrobat Reader software ,which can be downloaded free from Adobe’s Web site. Introduction to C++ Lecture Slides By Adil Aslam
  56. 56. Document Management Software • Examples: • Adobe Acrobat • Enfocus PitStop • Nuance PDF Converter Introduction to C++ Lecture Slides By Adil Aslam
  57. 57. Graphics And Multimedia Software • Many people work with software designed specifically for their field of work. Power users such as engineers, architects, desktop publishers, and graphic artists often use sophisticated software that allows them to work with graphics and multimedia. • This software includes computer-aided design, desktop publishing, paint/image editing, photo editing, video and audio editing, multimedia authoring, and Web page authoring. Introduction to C++ Lecture Slides By Adil Aslam
  58. 58. Computer-Aided Design • is a sophisticated type of application software that assists a professional user in creating engineering, architectural, and scientific designs. For example, engineers create design plans for vehicles and security systems. Architects design building structures and floor plans. Scientists design drawings of molecular structures. • Examples of CAD • Autodesk AutoCAD • Chief Architect Chief Architect • Microsoft Visio Introduction to C++ Lecture Slides By Adil Aslam
  59. 59. Desktop Publishing Software • Enables professional designers to create sophisticated documents that contain text, graphics, and many colors . • Professional DTP software is ideal for the production of high-quality color documents such as textbooks, corporate newsletters, marketing literature, product catalogs, and annual reports. • Designers and graphic artists can print finished publications on a color printer, take them to a professional printer, or post them on the Web in a format Introduction to C++ Lecture Slides By Adil Aslam
  60. 60. Desktop Publishing Software • Examples: • Adobe InDesign • Corel Ventura • Quark QuarkXPress Introduction to C++ Lecture Slides By Adil Aslam
  61. 61. Paint/Image Editing Software • Paint software, also called illustration software, allows users to draw pictures, shapes, and other graphical images with various on-screen tools such as a pen, brush, eyedropper, and paint bucket. • Image editing software provides the capabilities of paint software and also includes the capability to enhance and modify existing pictures and images. Modifications can include adjusting or enhancing image colors, adding special effects Introduction to C++ Lecture Slides By Adil Aslam
  62. 62. Paint/Image Editing Software • Examples: • Adobe Illustrator • Corel Painter • Microsoft Expression Design • Photo Editing (for the Professional) • Adobe Photoshop • Arcadia PhotoPerfect Ultimate • Nik Software Nik Professional Suite Introduction to C++ Lecture Slides By Adil Aslam
  63. 63. Video and Audio Editing Software • Video editing software allows professionals to modify a segment of a video, called a clip. For example, users can reduce the length of a video clip, reorder a series of clips, or add special effects such as words that move horizontally across the screen. • Audio editing software lets users modify audio clips, produce studio quality soundtracks, and add audio to video clips . • Most television shows and movies are created or enhanced using video and audio editing software. Introduction to C++ Lecture Slides By Adil Aslam
  64. 64. Video and Audio Editing Software • Examples: • Adobe Audition, Premiere Pro, Soundbooth • Avid Technology Avid Media Composer • Cakewalk SONAR • Sony ACID Pro Introduction to C++ Lecture Slides By Adil Aslam
  65. 65. Web Page Authoring Software • Helps users of all skill levels create Web pages that include graphical images, video, audio, animation, and special effects with interactive content. • In addition, many Web page authoring programs allow users to organize, manage, and maintain Web sites. • Application software, such as Word and Excel, often includes Web page authoring features. This allows home and small business users to create basic Web pages using application software they already own. For more sophisticated Web pages, users work with Web page authoring software. Introduction to C++ Lecture Slides By Adil Aslam
  66. 66. Web Page Authoring Software • Examples: • Adobe Dreamweaver • Adobe Fireworks • Adobe Flash • Microsoft Expression Web • Microsoft SharePoint Designer Introduction to C++ Lecture Slides By Adil Aslam
  67. 67. Tax Preparation Software • Tax preparation software, which is available both as packaged software and Web applications, can guide individuals, families, or small businesses through the process of filing federal taxes. • These programs forecast tax liability and offer money-saving tax tips, designed to lower your tax bill. After you answer a series of questions and complete basic forms, the software creates and analyzes your tax forms to search for missed potential errors and deduction opportunities. Introduction to C++ Lecture Slides By Adil Aslam
  68. 68. Tax Preparation Software • Examples: • 2nd Story Software TaxACT • H&R Block TaxCut • Intuit TurboTax Introduction to C++ Lecture Slides By Adil Aslam
  69. 69. Desktop Publishing Software • Personal DTP software helps home and small business users create newsletters, brochures, flyer advertisements, postcards, greeting cards, letterhead, business cards, banners, calendars, logos, and Web pages. • Although many word processing programs include DTP features, users often prefer to create DTP documents using DTP software because of its enhanced features. Introduction to C++ Lecture Slides By Adil Aslam
  70. 70. Desktop Publishing Software • Examples: • Broderbund The Print Shop • PrintMaster • Microsoft Publisher Introduction to C++ Lecture Slides By Adil Aslam
  71. 71. Photo Management Software • Photo management software, you can view, organize, sort, catalog, print, and share digital photos. Some photo editing software includes photo management functionality. • Examples: • Yahoo! Flickr • Google Picasa • Microsoft Windows Live Photo • Gallery Introduction to C++ Lecture Slides By Adil Aslam
  72. 72. System Software VS. Application Software Introduction to C++ Lecture Slides By Adil Aslam
  73. 73. Application and System Software Working Introduction to C++ Lecture Slides By Adil Aslam A diagram showing how the user interacts with application software on a typical desktop computer. The application software layer interfaces with the operating system, which in turn communicates with the hardware. The arrows indicate information
  74. 74. Operating Systems Components • Kernel • With the aid of the firmware and device drivers, the kernel provides the most basic level of control over all of the computer's hardware devices. It manages memory access for programs in the RAM, it determines which programs get access to which hardware resources, it sets up or resets the CPU's operating states for optimal operation at all times, and it organizes the data for long-term non-volatile storage with file systems on such media as disks, tapes, flash memory, etc. Introduction to C++ Lecture Slides By Adil Aslam
  75. 75. Operating Systems Components • Program Execution • The operating system provides an interface between an application program and the computer hardware, so that an application program can interact with the hardware only by obeying rules and procedures programmed into the operating system. The operating system is also a set of services which simplify development and execution of application programs. Executing an application program involves the creation of a process by the operating system kernel which assigns memory space and other resources, establishes a priority for the process in multi-tasking systems, loads program binary code into memory, and initiates execution of the application program which then interacts with the user and with hardware devices. Introduction to C++ Lecture Slides By Adil Aslam
  76. 76. Operating Systems Components Introduction to C++ Lecture Slides By Adil Aslam A kernel connects the application software to the hardware of a computer.
  77. 77. Why Programming? • Our civilization runs on software: • Most engineering activities involve software • Programming is important are: • To interact with machines and computers • To automate tasks • To create intelligent machines, etc. Introduction to C++ Lecture Slides By Adil Aslam
  78. 78. Ships • Design • Construction • Management  Monitoring  Engine Introduction to C++ Lecture Slides By Adil Aslam
  79. 79. Aircraft • Communication • Control • Display  Signal processing  “Gadget” control  Monitoring Introduction to C++ Lecture Slides By Adil Aslam
  80. 80. Mobile Phones • Voice quality • User interfaces • Billing • Mobility Introduction to C++ Lecture Slides By Adil Aslam
  81. 81. Computer Hardware's • A computer consists of various devices referred to as hardware (e.g., the keyboard, screen, mouse, hard disks, memory, DVD sand processing units). Introduction to C++ Lecture Slides By Adil Aslam
  82. 82. Programming Languages • Programmers write instructions in various programming languages, some directly understand able by computers and others requiring intermediate translation steps. Hundreds of such languages are in use to day. These may be divided into three general types: • Machine Language • Assembly Language • High level languages • Procedural Languages • Object Oriented Languages Introduction to C++ Lecture Slides By Adil Aslam
  83. 83. Machine Language • Written in the form of 0 & 1 • Any computer can directly understand only its own machine language, defined by its hardware design. • 1011000000000101 • 1011000000000001 • 1101110000000111 • Machine Dependent Introduction to C++ Lecture Slides By Adil Aslam
  84. 84. Assembly Languages • It is a low level language • Use Naturally understandable symbols called “Mnemonics” • Example: Load 5, Load 1, Add • Assemblers are used as interpreter • It work directly with microprocessor Introduction to C++ Lecture Slides By Adil Aslam
  85. 85. Assembly vs. Machine Language Assembly Language Machine code SUB AX , BX 01010101011 MOV CX , AX 01010101010 MOV DX , 0 11010101010 • Assembly language is intermediate between high level language and machine code. Introduction to C++ Lecture Slides By Adil Aslam
  86. 86. High Level Languages • Use naturally understandable language • Compilers are used as interpreter • IDE’s are use for rapid development like C++ , .NET environment, Visual Basic and Visual C++ Introduction to C++ Lecture Slides By Adil Aslam
  87. 87. Procedural Languages • Procedural programming is a list or set of instructions telling a computer what to do step by step and how to perform from the first code to the second code. • Procedural programming languages include C, Go, Fortran, Pascal, and BASIC. Introduction to C++ Lecture Slides By Adil Aslam
  88. 88. Object Oriented Language • Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which are data structures that contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods. • Significant object-oriented languages include Python C++ , Objective-C , Java , C# etc. Introduction to C++ Lecture Slides By Adil Aslam
  89. 89. C++ Procedure Oriented Programming POP's • High level languages such as COBOL, FORTRAN and C, is commonly known as procedure oriented programming(POP). In the procedure oriented programming, program is divided into sub programs or modules and then assembled to form a complete program. These modules are called functions. • In a multi-function program, many important data items are placed as global so that they may be accessed by all functions. Each function may have its own local data. If a function made any changes to global data, these changes will reflect in other functions. Global data are more unsafe to an accidental change by a function. In a large program it is very difficult to identify what data is used by which function Introduction to C++ Lecture Slides By Adil Aslam
  90. 90. Characteristics of Procedure Oriented Programming • C++ is an Object Oriented Programming Language (OOPL). • C++ have huge Function Library. • C++ is highly Flexible language with Versatility. • C++ can be used for developing System Software viz., operating systems, compilers, editors and data bases. • C++ is suitable for Development of Reusable Software. , thus reduces cost of software development. • C++ is a Machine Independent Language. Introduction to C++ Lecture Slides By Adil Aslam
  91. 91. Procedural VS. Object Oriented Introduction to C++ Lecture Slides By Adil Aslam Procedural Object Oriented Early High Level Languages Later High Level Languages Contain Functions written and used inside the program Contain method (or function) and variables that can written in main or external program POP fellow the Top Down Approach OOP fellow the Bottom Up Approach POP does not have any access specifier OOP has access specifier named are public , private , protected etc.
  92. 92. Procedural VS. Object Oriented Introduction to C++ Lecture Slides By Adil Aslam Procedural: Top down design Global data focused Limited code reuse Complex code Object-Oriented: Object focused design Protected data Code reuse Complex design VS.
  93. 93. C++ as a Programming Language • Extended version of C language • C is Evolved by Dennis Ritchie • C++ is developed by Bjarne Stroustrup Introduction to C++ Lecture Slides By Adil Aslam
  94. 94. C++ as a Programming Language • Extended version of C language • C is Evolved by Dennis Ritchie • C++ is developed by Bjarne Stroustrup Introduction to C++ Lecture Slides By Adil Aslam
  95. 95. Some History of C++ • C++ is a computer programming language developed in 1980 by Bjarne Trustful at the Bell Telephone Laboratories. C++ is an Object Oriented Programming Language, which follow oops concept like, inheritance, encapsulation, abstraction and polymorphism. • C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. Introduction to C++ Lecture Slides By Adil Aslam
  96. 96. Why C++ • Mother of almost all programming languages • You can’t learn to program without a programming language • The purpose of a programming language is to allow you to express your ideas in code • C++ is the language that most directly allows you to express ideas from the largest number of application areas • C++ is the most widely used language in engineering area • Programming concepts that you learn using C++ can be used fairly directly in other languages • Including C, Java, C#, and (less directly) Fortran • C++ is available on almost all kinds of computers Introduction to C++ Lecture Slides By Adil Aslam
  97. 97. Where We Use C++ Language • C++ Language is mainly used for: • Design Operating system • Design Language Compiler • Design Database • Utilities • Application Software Introduction to C++ Lecture Slides By Adil Aslam
  98. 98. Some C++ Features • C++ is C. C++ supports (almost) all the features of C. Like C, C++ allows programmers to manage the memory directly, so as to develop efficient programs. • C++ is OO. C++ enhances the procedural-oriented C language with the object-oriented extension. • The OO extension facilitates design, reuse and maintenance for complex software. • Template C++. • C++ introduces generic programming, via the so-called template. • STL. C++ provides a huge set of reusable standard libraries. • STL Stand For Standard Template Library . Introduction to C++ Lecture Slides By Adil Aslam
  99. 99. C++ Strength and Pitfall • C++ is a powerful language for high-performance applications, including writing operating systems and their subsystems, games and animation. • C++ is also a complex and difficult programming language, which is really not meant for dummies. For example, to effectively use the C++ Standard Template Library (STL), you need to understand these difficult concepts: pointers, references, operator overloading and template. Introduction to C++ Lecture Slides By Adil Aslam
  100. 100. Features of C++ Introduction to C++ Lecture Slides By Adil Aslam
  101. 101. Features of C++ • Simple • Portability • Powerful • Platform dependent • Object Oriented Language • Case sensitive • Compiler based • Syntax based language • Use of Pointers Introduction to C++ Lecture Slides By Adil Aslam
  102. 102. Features of C++ • Simple • Every C++ program can be written in simple English language so that it is very easy to understand and developed by programmer. • Powerful • C++ is a very powerful programming language, it have a wide verity of data types, functions, control statements, decision making statements, etc. • Object Oriented Programming Language • This main advantage of C++ is, it is object oriented programming language. It follow concept of oops like polymorphism, inheritance, encapsulation, abstraction. Introduction to C++ Lecture Slides By Adil Aslam
  103. 103. Features of C++ • Platform Dependent • A language is said to be platform dependent whenever the program is execute in the same operating system where that was developed and compiled but not run and execute on other operating system. C++ is platform dependent language. Introduction to C++ Lecture Slides By Adil Aslam
  104. 104. Features of C++ • Portability • It is the concept of carrying the instruction from one system to another system. In C++ Language .cpp file contain source code, we can edit also this code. .exe file contain application, only we can execute this file. When we write and compile any C++ program on window operating system that program easily run on other window based system. Introduction to C++ Lecture Slides By Adil Aslam
  105. 105. Features of C++ • Case Sensitive • C++ is a case sensitive programming language. In C++ programming 'break and BREAK' both are different. • If any language treats lower case latter separately and upper case latter separately than they can be called as case sensitive programming language [Example c, c++, java, .net are sensitive programming languages.] other wise it is called as case insensitive programming language [Example HTML, SQL is case insensitive programming languages]. • Compiler Based • C++ is a compiler based programming language that means without compilation no C++ program can be executed. First we need compiler to compile our program and then execute. Introduction to C++ Lecture Slides By Adil Aslam
  106. 106. Features of C++ • Syntax Based Language • C++ is a strongly tight syntax based programming language. If any language follow rules and regulation very strictly known as strongly tight syntax based language. Example C, C++, Java, .net etc. If any language not follow rules and regulation very strictly known as loosely tight syntax based language. Example HTML. • Efficient use of Pointers • Pointers is a variable which hold the address of another variable, pointer directly direct access to memory address of any variable due to this performance of application is improve. In C++ language also concept of pointer are available. Introduction to C++ Lecture Slides By Adil Aslam
  107. 107. Applications of C++ • Mainly C++ Language is used for Develop Desktop application and system software. Some application of C++ language are given below: • For Develop Graphical related application like computer and mobile games. • To evaluate any kind of mathematical equation use C++ language. • C++ Language are also used for design OS. Like window xp. • Few parts of apple OS X are written in C++ programming language. • Internet browser Firefox are written in C++ programming language • All major applications of adobe systems are developed in C++ programming language. Like Photoshop, Image Ready, Illustrator and Adobe Premier. • Some of the Google applications are also written in C++, including Google file system and Google Chromium. • C++ are used for design database like MySQL. Introduction to C++ Lecture Slides By Adil Aslam
  108. 108. Benefits of C++ Over C Language • The major difference being OOPS concept, C++ is an object oriented language whereas C language is a procedural language. Apart form this there are many other features of C++ which gives this language an upper hand on C language. • Following features of C++ makes it a stronger language than C, Introduction to C++ Lecture Slides By Adil Aslam
  109. 109. Benefits of C++ Over C Language • There is Stronger Type Checking in C++. • All the OOPS features in C++ like Abstraction, Encapsulation, Inheritance etc makes it more worthy and useful for programmers. • C++ supports and allows user defined operators (i.e Operator Overloading) and function overloading is also supported in it. • Exception Handling is there in C++. • The Concept of Virtual functions and also Constructors and Destructors for Objects. • Inline Functions in C++ instead of Macros in C language. Inline functions make complete function body act like Macro, safely. Introduction to C++ Lecture Slides By Adil Aslam
  110. 110. Difference Between C and C++ Introduction to C++ Lecture Slides By Adil Aslam C C++ C is the function or procedure programming language. C++ is the object oriented programming language. Top down approach is used in C. Bottom up approach is used in C++. C is less secure than C++ C++ is secure, because oop's concept is available. Here Data is hidden and can't be accessed by external functions. In C programming variable declaration is possible only top of program. In C++ you can any where declare variable. In C, namespace feature is not available. In C++, namespace feature is present. C is a middle level language. C++ is a high level language
  111. 111. Difference Between C and C++ Introduction to C++ Lecture Slides By Adil Aslam C C++ In this programming, programs are divided into modules and functions. In this programming, programs are divided into classes and functions. Here no exception handling concept is available It support exception handling concept. C uses scanf() and printf() function for standard input and output. C++ uses cin>> and cout<< for standard input and output. Features like function overloading and operator overloading is not present. C++ supports function overloading and operator overloading. C program file is saved with .C extension. C++ program file is saved with .CPP extension.
  112. 112. Tools of the Trade • As programmer we need different tools to develop a program. These tools are needed for the life cycle of programs Introduction to C++ Lecture Slides By Adil Aslam
  113. 113. Tools of the Trade • Editors • First of all we need a tool for writing the code of a program. For this purpose we used. • Editors in which we write our code. We can use word processor too for this, but word processors have many other features like bold the text, italic, coloring the text etc, so when we save a file written in a word processor, lot of other information including the text is saved on the disk. • For programming purposes we don’t need these things we only need simple text. • Text editors are such editors which save only the text which we type. So for programming we will be using a text editor Introduction to C++ Lecture Slides By Adil Aslam
  114. 114. Compiler and Interpreter • As we write the code in English and we know that computers can understand only 0s and1s. So we need a translator which translates the code of our program into machine language. • There are two kinds of translators which are known as Interpreter and Compilers. • These translators translate our program which is written in C-Language into Machine language. Introduction to C++ Lecture Slides By Adil Aslam
  115. 115. Interpreters • Interpreters translates the program line by line meaning it reads one line of program and translates it, then it reads second line, translate it and so on. • It is system software which is used to convert programming language code into binary format in step by step process. • The benefit of it is that we get the errors as we go along and it is very easy to correct the errors. • The drawback of the interpreter is that the program executes slowly as the interpreter translates the program line by line. Introduction to C++ Lecture Slides By Adil Aslam
  116. 116. Compilers • Compilers also translate the English like language (Code written in C) into a language (Machine language) which computers can understand. • The Compiler read the whole program and translates it into machine language completely. Introduction to C++ Lecture Slides By Adil Aslam
  117. 117. Compilers • A compiler is system software which converts programming language code into binary format in single steps. In other words Compiler is a system software which can take input from other any programming language and convert it into lower level machine dependent language. Introduction to C++ Lecture Slides By Adil Aslam
  118. 118. Assembler • An assembler is system software which is used to convert the assembly language instruction into binary format in step by step process. An assembler is system software which is used to convert the assembly language instruction into binary format. Introduction to C++ Lecture Slides By Adil Aslam Assembly Code Assembler Machine Code
  119. 119. Interpreters vs. Compilers • The difference between interpreter and compiler is that compiler will stop translating if it finds an error and there will be no executable code generated whereas Interpreter will execute all the lines before error and will stop at the line which contains the error. • So Compiler needs syntactically correct program to produce an executable code. We will be using compiler in our course Introduction to C++ Lecture Slides By Adil Aslam
  120. 120. Difference Between Compiler Interpreter Introduction to C++ Lecture Slides By Adil Aslam Compiler Interpreter Compiler takes Entire program as input at a time. Interpreter takes Single instruction as input at a time Intermediate Object code is generated No Intermediate Object code is generated It execute conditional control statements fastly. It execute conditional control statements slower than Compiler More memory is required. Less memory is required. Program need not to be compiled every time Every time higher level program is converted into lower level program It display error after entire program is checked It display error after each instruction interpreted (if any) Example: C, C++ Example: BASIC
  121. 121. Development Environment • Using a Complier • A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code). Introduction to C++ Lecture Slides By Adil Aslam
  122. 122. Development Environment • We Recommend the following Complier for C++ Programming. • Bloodshed Dev-C++ (V_5.11) Introduction to C++ Lecture Slides By Adil Aslam
  123. 123. Bloodshed Dev-C++ Installation • Download Dev C++ With Latest Version. • After Click .exe File for Installation • Then You can See this Type of Screen Introduction to C++ Lecture Slides By Adil Aslam
  124. 124. Bloodshed Dev-C++ Installation • After You can Seen this Type of Screen • Click Ok Introduction to C++ Lecture Slides By Adil Aslam
  125. 125. Bloodshed Dev-C++ Installation • Click “I Agree” Introduction to C++ Lecture Slides By Adil Aslam
  126. 126. Bloodshed Dev-C++ Installation • Click “Next” Introduction to C++ Lecture Slides By Adil Aslam
  127. 127. Bloodshed Dev-C++ Installation • Click “Install” Introduction to C++ Lecture Slides By Adil Aslam
  128. 128. Bloodshed Dev-C++ Installation • Then Click “Finish” Introduction to C++ Lecture Slides By Adil Aslam
  129. 129. Bloodshed Dev-C++ Installation • After Click “Next” Introduction to C++ Lecture Slides By Adil Aslam
  130. 130. Bloodshed Dev-C++ Installation • Then click again “Next” Introduction to C++ Lecture Slides By Adil Aslam
  131. 131. Bloodshed Dev-C++ Installation • Click “Ok” Introduction to C++ Lecture Slides By Adil Aslam
  132. 132. Create a New Project • For New Project/Program Click Like this Introduction to C++ Lecture Slides By Adil Aslam
  133. 133. Create a New Project • After Click “Console Application” and click “Ok” Introduction to C++ Lecture Slides By Adil Aslam You can change the project name as you want Name of the Project
  134. 134. Create a New Project Introduction to C++ Lecture Slides By Adil Aslam This is the screen where you can start coding of your program
  135. 135. Compilation of Program • For Compile your program Press “F11” or Fellow this Introduction to C++ Lecture Slides By Adil Aslam
  136. 136. Error Correction • For Error Correction Follow Like this Introduction to C++ Lecture Slides By Adil Aslam Missing Semicolon Double click on the error
  137. 137. Typically C++ Development Environment • C++ programs typically go through six phases: 1. Edit 2. Preprocess 3. Compile 4. Link 5. Load 6. Execute Introduction to C++ Lecture Slides By Adil Aslam
  138. 138. Phase 1: Creating a Program • Phase 1consists of editing a file with an editor program , normally known simply as an editor.(Like Dev C++). • Type a C++ program (typically referred to as source code) using the editor , and save C++ source code file names with extensions like .cpp , .cxx , .cc or .C , which indicate that a file contains C++ source code. Introduction to C++ Lecture Slides By Adil Aslam
  139. 139. Phase 2: Preprocessing a C++ Program • In Phase 2 ,you give the command to compile the program. • In a C++ system , a preprocessor program executes automatically before the compiler’s translation phase begins. • The C++preprocessor obeys commands called preprocessor directives, which indicate that certain manipulations are to be performed on the program before compilation. Introduction to C++ Lecture Slides By Adil Aslam
  140. 140. Phase3: Compiling a C++ Program • In Phase 3, the compiler translates the C++ program in to machine-language code—also referred to as object code. Introduction to C++ Lecture Slides By Adil Aslam
  141. 141. Phase4: Linking • A linker links the object code with the code for the missing functions to produce an executable program • If the program compiles and links correctly, an executable image is produced. Introduction to C++ Lecture Slides By Adil Aslam
  142. 142. Phase5: Loading • Phase 5 is called loading. Before a program can be executed, it must first be placed in memory. • This is done by the loader, which takes the executable image from disk and transfers it to memory. • Additional components from shared libraries that support the program are also loaded. Introduction to C++ Lecture Slides By Adil Aslam
  143. 143. Phase5: Loading Introduction to C++ Lecture Slides By Adil Aslam
  144. 144. Phase6: Execution • Finally, the computer , under the control of its CPU, executes the program one instruction at a time • Some modern computer architectures can execute several instructions in parallel. Introduction to C++ Lecture Slides By Adil Aslam
  145. 145. C++ OOP's ( Object Oriented Programming ) • Object Oriented Programming is a programming in which we design and develop our application or program based of object. Objects are instances(variables) of class. • Object oriented programming does not allow data to flow freely around the system. It binds data more closely to the functions that operate on it, and protects it from accidental modifications from outside functions. • Object oriented programming allows separation of a complex programs into objects and then builds data and functions around these objects. The data of an object can be accessed only by the functions associated with that object. However, functions of one object can access the functions of other objects. Introduction to C++ Lecture Slides By Adil Aslam
  146. 146. Features of OOP's ( Object Oriented Programming ) Introduction to C++ Lecture Slides By Adil Aslam
  147. 147. Features of OOP's ( Object Oriented Programming ) • Class : Class is an encapsulation of data and coding. Classes are an expanded version of structures. Structure can contain multiple variables. Classes can contain multiple variables, even more, classes can also contain functions as class member. Variables available in class are called Data Members. Functions available in class are called Member Functions. • Object : Class is a user-defined data type and object is a variable of class type. Object is used to access class members. • Inheritance : Inheritance means access the properties and features of one class into another class. The class who is going to provide its features to another class will be called base class and the class who is using the properties and features of another class will be called derived class. Introduction to C++ Lecture Slides By Adil Aslam
  148. 148. Features of OOP's ( Object Oriented Programming ) • Polymorphism : Polymorphism means more than one function with same name, with different working. It can be static or dynamic. In static polymorphism memory will be allocated at compile time. In dynamic polymorphism memory will be allocated at runtime. Both function overloading and operator overloading are an examples of static polymorphism. Virtual function is an example of dynamic polymorphism. • Data Abstraction : The basic idea of data abstraction is to visible only the necessary information, unnecessary information will be hidden from the outside world. This can be done by making class members as private members of class. Private members can be accessed only within the same class where they are declared. Introduction to C++ Lecture Slides By Adil Aslam
  149. 149. Features of OOP's ( Object Oriented Programming ) • Encapsulation : Encapsulation is a process of wrapping data members and member functions in a single unit called class. Using the method of encapsulation, the programmer cannot directly access the data. Data is only accessible through the object of the class. Introduction to C++ Lecture Slides By Adil Aslam
  150. 150. C++ Benefits of OOP's • Through inheritance, we can eliminate redundant code and extend the use of existing classes which is not possible in procedure oriented approach. • We can build programs from the standard working modules that communicate with one another, rather than having to start writing the code from scratch which happens procedure oriented approach. This leads to saving of development time and higher productivity. • The principle of data hiding helps the programmer to build secure programs that cannot be invaded by code in other parts of the program. • It is possible to have multiple instances of object to co- exist without any interference. Introduction to C++ Lecture Slides By Adil Aslam
  151. 151. C++ Benefits of OOP's • It is possible to map objects in the problem domain to those in the program. • It is easy to partition the work in a project based on objects . • The data-centered design approach enables us to capture more details of a model in implementable from. • Object oriented systems can be easily upgraded from small to large systems. • Message passing techniques for communication between objects makes the interface descriptions with external systems much simpler. • Software complexity can be easily managed. Introduction to C++ Lecture Slides By Adil Aslam
  152. 152. In Upcoming Lecture We Learn • Sample Program • Program Structure • Semicolons and Blocks in C++ • Comments in C++ • Variable In C++ • Keywords in C++ • Data Type In C++ • Arithmetic Operators • Precedence of Operators Introduction to C++ Lecture Slides By Adil Aslam
  153. 153. What is Open Source Software? • In Software terms, open source refers to a software which has it’s source code freely available on the Internet to download. In comparison, the source code for proprietary commercial software is usually a closely guarded secret of the company. • Or in slightly more user-friendly language, open source software is available for the general public to use and modify from its original design free of charge. • Open source software is distributed under different types of licenses such as LGPL, GNU, BSD, Apache, etc. In nearly all these cases the software can be used without paying a fee. It should be noted that sometimes large organizations distribute the source code, such as Apache, Open Office, Mozilla, etc. Introduction to C++ Lecture Slides By Adil Aslam
  154. 154. What is Closed Source Software? • Closed source software can be defined as proprietary software distributed under a licensing agreement to authorized users with private modification, copying, and republishing restrictions. • Or in layman terms, the source code is not shared with the public for anyone to look at or change. Closed source is the opposite of open source. • Closed source is actually the sort of arrangement that you would expect from most businesses, protective of their product and keen to maintain control over their brand and the user experience offered to their customers. Think Apple rather than Android. Introduction to C++ Lecture Slides By Adil Aslam
  155. 155. Open Source VS. Closed Source Softwares Introduction to C++ Lecture Slides By Adil Aslam

×