SlideShare uma empresa Scribd logo
1 de 21
INTERODUCTION TO C++
ATM PROJECT
SUBMITTED BY:- SUBMITTED TO:-
AMRESH KUMAR DR.MUKESH SHARMA
(14IT004) (H.O.D of CS/IT
DEPARTMENT)
TOPICS:-
1.Principal of object-oriented programing
2.Classes and Objects
3.Funtions in C++
4.Constructor and Destructor
5.Operator Overloading and type conversion
6.Inheritance
7.Pointers,Virtual funtions and Polymorphism
8.Working with files
9.Templates
10.Exception handling
The C++ Language:-
 Bjarne Stroupstrup, the language’s creator
C++ was designed to provide
Simula’s facilities for program
organization together with C’s
efficiency and flexibility for
systems programming.
1.PRINCIPLES OF OBJECT ORIENTED
PROGRAMING
Conventional programming, using high level languages such as
COBOL,FORTRAN and C,is commonly known as procedure
oriented programming (POP). In the POP approach, the problem
is viewed as a sequence of things to be done such as
reading,calculating and printing. A number of functions are
written to accomplish these tasks. The primary focus is on
functions. A typical structure for procedural programming is
shown in the fig
Another serious drawback is that it does not model real world
problems very well.
Some characteristics exhibited by procedure-oriented programming are:
1) Emphasis is on doing things (algorithms).
2) Large programs are divided into smaller programs known as functions.
3) Most of the functions share global data.
4) Data move openly around system from function to function.
5) Functions transform data from one form to another.
6) Employs top-down approach in program design.
The major motivating factor in the invention of object-oriented programing
Is to remove some flaws encountered in the procedural approach
Some of the striking features of object – oriented programming are:
 Emphasis is on data rather than procedure.
 Programs are divided into what are known as objects.
 Functions that operate on the data of an object are tied together.
 Data is hidden and cannot be accessed without functions.
 Objects may communicate with each other through functions.
 New data and functions can be easily added whenever necessary.
 Follows bottom-up approach in program design.
The OOP language is divided into four major concepts.
 Encapsulation
 Inheritance
 Polymorphism
 Abstraction
Encapsulation in C++
Encapsulation is one of the major cores of OOP. It is the
mechanism that binds code and data together and keeps
them safe and away from outside inference and misuse. In
short, it isolates a data from outside world. Encapsulation
can be called as the core concept of OOP because it is
encapsulation that reduces the maintenance burden, and
limiting your exposure to vulnerabilities.
Inheritance in C++
This technique also supports the hierarchical classification in
which each object would not need to be redefined by all its
characteristics explicitly. It prevents the programmer from
unnecessary work and it is the inheritance concept that does
this job.
Polymorphism in C++
Polymorphism,means the ability
To take more than one works.
Polymorphismc may be:-
1.Operator overloading
2Funtion overloading
Abstraction in c++
Abstraction refers to the act of representing essential features
Without including the background detailsor explanations.
Let's take one real life example of a TV, which you can turn on and
off, change the channel, adjust the volume, and add external
components such as speakers, VCRs, and DVD players, BUT you do
not know its internal details, that is, you do not know how it
receives signals over the air or through a cable, how it translates
them, and finally displays them on the screen.
2.CLASSES AND OBJECTS
CLASSES
When you define a class, you define a blueprint for a data type.
This doesn't actually define any data, but it does define what the
class name means, that is, what an object of the class will consist
of and what operations can be performed on such an object.
class box
{
double length;
double breadth;
double height;
};
OBJECTS
A class provides the blueprints for objects, so basically an
object is created from a class. We declare objects of a class
with exactly the same sort of declaration that we declare
variables of basic types.
box b1;//1st object of box
box b2;//2nd object of box
3.FUNTIONS
A function is a group of statements that together perform a
task. Every C++ program has at least one function, which
is main(), and all the most trivial programs can define
additional functions.
The C++ standard library provides numerous built-in
functions that your program can call. For example,
function strcat() to concatenate two strings,
function memcpy() to copy one memory location to another
location and many more functions.
SYNTAX:-
Return-type function name(Arguments)
{
Body of the funtions
}
4.CONSTRUCTOR AND DESTRUCTOR
CONSTRUCTOR
A class constructor is a special member function of a class
that is executed whenever we create new objects of that
class.
A constructor will have exact same name as the class and it
does not have any return type at all, not even void.
Constructors can be very useful for setting initial values for
certain member variables.
DESTRUCTOR
A destructor is a special member function of a class that is
executed whenever an object of it's class goes out of scope
or whenever the delete expression is applied to a pointer to
the object of that class.
A destructor will have exact same name as the class prefixed
with a tilde (~)
5.OPERATOR OVERLOADING AND TYPE
CONVERSION
OPERATOR OVERLOADING
Overloaded operators are functions with special names the keyword
operator followed by the symbol for the operator being defined.
Like any other function, an overloaded operator has a return type
and a parameter list.
box operator+(int box)
TYPE CONVERSION
Implicit conversions do not require any operator. They are
automatically performed when a value is copied to a compatible
type. For example:
short a=2000;
int b;
b = (int) a; // c-like cast notation
b = int (a); // functional notation
6.INHERITANCE
Inheritance allows us to define a class in terms of another
class, which makes it easier to create and maintain an
application. This also provides an opportunity to reuse the
code functionality and fast implementation time.
When creating a class, instead of writing completely new
data members and member functions, the programmer can
designate that the new class should inherit the members of
an existing class. This existing class is called the base
class, and the new class is referred to as the derived class.
Eg:-
class derieved class:acess specifier base class
7.THIS POINTER AND VIRTUAL FUNCTION
POINTER
Every object in C++ has access to its own address through an
important pointer called this pointer. The this pointer is an
implicit parameter to all member functions. Therefore, inside
a member function, this may be used to refer to the invoking
object.
Friend functions do not have a this pointer, because friends are
not members of a class. Only member functions have
a this pointer.
VIRTUAL FUNTION
A virtual function is a member function that is declared within
a base class and redefined by a derived class. To create virtual
function, precede the function’s declaration in the base class
with the keyword virtual. When a class containing virtual
function is inherited, the derived class redefines the virtual
function to suit its own needs.
8.WORKING WITH FILES
we have been using the iostream standard library, which
provides cinand cout methods for reading from standard input
and writing to standard output respectively.
This tutorial will teach you how to read and write from a file.
This requires another standard C++ library called fstream,
which defines three new data types:
ofstream This data type represents the output
file stream and is used to create files
and to write information to files.
ifstream This data type represents the input
file stream and is used to read
information from files.
fstream This data type represents the file
stream generally, and has the
capabilities of both ofstream and
ifstream which means it can create
files, write information to files, and
read information from files.
9.TEMPLATES
Templates are the foundation of generic programming, which
involves writing code in a way that is independent of any
particular type.
A template is a blueprint or formula for creating a generic
class or a function. The library containers like iterators and
algorithms are examples of generic programming and have
been developed using template concept.
There is a single definition of each container, such
as vector, but we can define many different kinds of vectors
for example, vector <int> or vector <string>.
template <class type> ret-type func-name(parameter list)
{
// body of function
}
10.EXCEPTION HANDLING
An exception is a problem that arises during the execution of a
program. A C++ exception is a response to an exceptional
circumstance that arises while a program is running, such as an
attempt to divide by zero.
Exceptions provide a way to transfer control from one part of a
program to another. C++ exception handling is built upon three
keywords: try, catch, andthrow.
 throw: A program throws an exception when a problem shows
up. This is done using a throw keyword.
 catch: A program catches an exception with an exception
handler at the place in a program where you want to handle
the problem. Thecatch keyword indicates the catching of an
exception.
 try: A try block identifies a block of code for which particular
exceptions will be activated. It's followed by one or more
catch blocks.
Assuming a block will raise an exception, a method catches an
exception using a combination of the try and catch keywords. A
try/catch block is placed around the code that might generate
an exception.
Try
{
// protected code
}
catch( ExceptionName e1 )
{
// catch block
}
catch( ExceptionName e2 )
{ // catch block
}
catch( ExceptionName eN )
{
// catch block
}
C++ ATM Project Introduction

Mais conteúdo relacionado

Mais procurados

C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1ReKruiTIn.com
 
Top C Language Interview Questions and Answer
Top C Language Interview Questions and AnswerTop C Language Interview Questions and Answer
Top C Language Interview Questions and AnswerVineet Kumar Saini
 
Object Oriented Programming With Real-World Scenario
Object Oriented Programming With Real-World ScenarioObject Oriented Programming With Real-World Scenario
Object Oriented Programming With Real-World ScenarioDurgesh Singh
 
Object Oriented Programming using C++ Part III
Object Oriented Programming using C++ Part IIIObject Oriented Programming using C++ Part III
Object Oriented Programming using C++ Part IIIAjit Nayak
 
C++ Object Oriented Programming
C++  Object Oriented ProgrammingC++  Object Oriented Programming
C++ Object Oriented ProgrammingGamindu Udayanga
 
Static and Dynamic polymorphism in C++
Static and Dynamic polymorphism in C++Static and Dynamic polymorphism in C++
Static and Dynamic polymorphism in C++Anil Bapat
 
C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answerlavparmar007
 
OODP Unit 1 OOPs classes and objects
OODP Unit 1 OOPs classes and objectsOODP Unit 1 OOPs classes and objects
OODP Unit 1 OOPs classes and objectsShanmuganathan C
 
Learn Concept of Class and Object in C# Part 3
Learn Concept of Class and Object in C#  Part 3Learn Concept of Class and Object in C#  Part 3
Learn Concept of Class and Object in C# Part 3C# Learning Classes
 

Mais procurados (20)

Chapter 2 c#
Chapter 2 c#Chapter 2 c#
Chapter 2 c#
 
Ppt of c vs c#
Ppt of c vs c#Ppt of c vs c#
Ppt of c vs c#
 
Ppt of c++ vs c#
Ppt of c++ vs c#Ppt of c++ vs c#
Ppt of c++ vs c#
 
Class and object
Class and objectClass and object
Class and object
 
Inheritance
InheritanceInheritance
Inheritance
 
C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1
 
Top C Language Interview Questions and Answer
Top C Language Interview Questions and AnswerTop C Language Interview Questions and Answer
Top C Language Interview Questions and Answer
 
Object Oriented Programming With Real-World Scenario
Object Oriented Programming With Real-World ScenarioObject Oriented Programming With Real-World Scenario
Object Oriented Programming With Real-World Scenario
 
Object-Oriented Programming Using C++
Object-Oriented Programming Using C++Object-Oriented Programming Using C++
Object-Oriented Programming Using C++
 
iOS Application Development
iOS Application DevelopmentiOS Application Development
iOS Application Development
 
Object Oriented Programming using C++ Part III
Object Oriented Programming using C++ Part IIIObject Oriented Programming using C++ Part III
Object Oriented Programming using C++ Part III
 
C++ Object Oriented Programming
C++  Object Oriented ProgrammingC++  Object Oriented Programming
C++ Object Oriented Programming
 
Static and Dynamic polymorphism in C++
Static and Dynamic polymorphism in C++Static and Dynamic polymorphism in C++
Static and Dynamic polymorphism in C++
 
1 puc programming using c++
1 puc programming using c++1 puc programming using c++
1 puc programming using c++
 
2. data, operators, io
2. data, operators, io2. data, operators, io
2. data, operators, io
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructors
 
C++ questions And Answer
C++ questions And AnswerC++ questions And Answer
C++ questions And Answer
 
OODP Unit 1 OOPs classes and objects
OODP Unit 1 OOPs classes and objectsOODP Unit 1 OOPs classes and objects
OODP Unit 1 OOPs classes and objects
 
Oops
OopsOops
Oops
 
Learn Concept of Class and Object in C# Part 3
Learn Concept of Class and Object in C#  Part 3Learn Concept of Class and Object in C#  Part 3
Learn Concept of Class and Object in C# Part 3
 

Destaque (20)

Polymorphism
PolymorphismPolymorphism
Polymorphism
 
C++ Sample Codes (Data Structure)
C++ Sample Codes (Data Structure)C++ Sample Codes (Data Structure)
C++ Sample Codes (Data Structure)
 
Lo39
Lo39Lo39
Lo39
 
Chapter 10
Chapter 10 Chapter 10
Chapter 10
 
Code Inventory
Code InventoryCode Inventory
Code Inventory
 
Visual basic coding
Visual basic codingVisual basic coding
Visual basic coding
 
14. Linked List
14. Linked List14. Linked List
14. Linked List
 
Inheritance : Extending Classes
Inheritance : Extending ClassesInheritance : Extending Classes
Inheritance : Extending Classes
 
How to Work with Dev-C++
How to Work with Dev-C++How to Work with Dev-C++
How to Work with Dev-C++
 
Input and output in C++
Input and output in C++Input and output in C++
Input and output in C++
 
Payroll
PayrollPayroll
Payroll
 
Constructors & destructors
Constructors & destructorsConstructors & destructors
Constructors & destructors
 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).ppt
 
Atm (bm)
Atm (bm)Atm (bm)
Atm (bm)
 
An atm with an eye
An atm with an eyeAn atm with an eye
An atm with an eye
 
automated teller machines
automated teller  machinesautomated teller  machines
automated teller machines
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructors
 
Constructor and destructor in c++
Constructor and destructor in c++Constructor and destructor in c++
Constructor and destructor in c++
 
Payroll Management System SRS
Payroll Management System SRSPayroll Management System SRS
Payroll Management System SRS
 
Classes and objects
Classes and objectsClasses and objects
Classes and objects
 

Semelhante a C++ ATM Project Introduction

Cs6301 programming and datastactures
Cs6301 programming and datastacturesCs6301 programming and datastactures
Cs6301 programming and datastacturesK.s. Ramesh
 
Introduction to C++ Programming
Introduction to C++ ProgrammingIntroduction to C++ Programming
Introduction to C++ ProgrammingPreeti Kashyap
 
Principal of objected oriented programming
Principal of objected oriented programming Principal of objected oriented programming
Principal of objected oriented programming Rokonuzzaman Rony
 
1 intro
1 intro1 intro
1 introabha48
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPTAjay Chimmani
 
7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.doc
7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.doc7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.doc
7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.docabdulhaq467432
 
C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]Rome468
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Languagedheva B
 
Interview preparation for programming.pptx
Interview preparation for programming.pptxInterview preparation for programming.pptx
Interview preparation for programming.pptxBilalHussainShah5
 
cbybalaguruswami-e-180803051831.pptx
cbybalaguruswami-e-180803051831.pptxcbybalaguruswami-e-180803051831.pptx
cbybalaguruswami-e-180803051831.pptxSRamadossbiher
 
cbybalaguruswami-e-180803051831.pptx
cbybalaguruswami-e-180803051831.pptxcbybalaguruswami-e-180803051831.pptx
cbybalaguruswami-e-180803051831.pptxSRamadossbiher
 
Object-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modulesObject-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modulesDurgesh Singh
 

Semelhante a C++ ATM Project Introduction (20)

My c++
My c++My c++
My c++
 
C++ Version 2
C++  Version 2C++  Version 2
C++ Version 2
 
Unit 5.ppt
Unit 5.pptUnit 5.ppt
Unit 5.ppt
 
SRAVANByCPP
SRAVANByCPPSRAVANByCPP
SRAVANByCPP
 
Cs6301 programming and datastactures
Cs6301 programming and datastacturesCs6301 programming and datastactures
Cs6301 programming and datastactures
 
Introduction to C++ Programming
Introduction to C++ ProgrammingIntroduction to C++ Programming
Introduction to C++ Programming
 
Principal of objected oriented programming
Principal of objected oriented programming Principal of objected oriented programming
Principal of objected oriented programming
 
1 intro
1 intro1 intro
1 intro
 
4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT4 pillars of OOPS CONCEPT
4 pillars of OOPS CONCEPT
 
7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.doc
7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.doc7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.doc
7.-Download_CS201-Solved-Subjective-with-Reference-by-Aqib.doc
 
C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Language
 
OOC MODULE1.pptx
OOC MODULE1.pptxOOC MODULE1.pptx
OOC MODULE1.pptx
 
Mca 504 dotnet_unit3
Mca 504 dotnet_unit3Mca 504 dotnet_unit3
Mca 504 dotnet_unit3
 
Interview preparation for programming.pptx
Interview preparation for programming.pptxInterview preparation for programming.pptx
Interview preparation for programming.pptx
 
Introduction of C++ By Pawan Thakur
Introduction of C++ By Pawan ThakurIntroduction of C++ By Pawan Thakur
Introduction of C++ By Pawan Thakur
 
cbybalaguruswami-e-180803051831.pptx
cbybalaguruswami-e-180803051831.pptxcbybalaguruswami-e-180803051831.pptx
cbybalaguruswami-e-180803051831.pptx
 
cbybalaguruswami-e-180803051831.pptx
cbybalaguruswami-e-180803051831.pptxcbybalaguruswami-e-180803051831.pptx
cbybalaguruswami-e-180803051831.pptx
 
Object-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modulesObject-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modules
 
C++
C++C++
C++
 

Último

GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 

Último (20)

GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 

C++ ATM Project Introduction

  • 1. INTERODUCTION TO C++ ATM PROJECT SUBMITTED BY:- SUBMITTED TO:- AMRESH KUMAR DR.MUKESH SHARMA (14IT004) (H.O.D of CS/IT DEPARTMENT)
  • 2. TOPICS:- 1.Principal of object-oriented programing 2.Classes and Objects 3.Funtions in C++ 4.Constructor and Destructor 5.Operator Overloading and type conversion 6.Inheritance 7.Pointers,Virtual funtions and Polymorphism 8.Working with files 9.Templates 10.Exception handling
  • 3. The C++ Language:-  Bjarne Stroupstrup, the language’s creator C++ was designed to provide Simula’s facilities for program organization together with C’s efficiency and flexibility for systems programming.
  • 4. 1.PRINCIPLES OF OBJECT ORIENTED PROGRAMING Conventional programming, using high level languages such as COBOL,FORTRAN and C,is commonly known as procedure oriented programming (POP). In the POP approach, the problem is viewed as a sequence of things to be done such as reading,calculating and printing. A number of functions are written to accomplish these tasks. The primary focus is on functions. A typical structure for procedural programming is shown in the fig
  • 5. Another serious drawback is that it does not model real world problems very well. Some characteristics exhibited by procedure-oriented programming are: 1) Emphasis is on doing things (algorithms). 2) Large programs are divided into smaller programs known as functions. 3) Most of the functions share global data. 4) Data move openly around system from function to function. 5) Functions transform data from one form to another. 6) Employs top-down approach in program design. The major motivating factor in the invention of object-oriented programing Is to remove some flaws encountered in the procedural approach
  • 6. Some of the striking features of object – oriented programming are:  Emphasis is on data rather than procedure.  Programs are divided into what are known as objects.  Functions that operate on the data of an object are tied together.  Data is hidden and cannot be accessed without functions.  Objects may communicate with each other through functions.  New data and functions can be easily added whenever necessary.  Follows bottom-up approach in program design.
  • 7. The OOP language is divided into four major concepts.  Encapsulation  Inheritance  Polymorphism  Abstraction Encapsulation in C++ Encapsulation is one of the major cores of OOP. It is the mechanism that binds code and data together and keeps them safe and away from outside inference and misuse. In short, it isolates a data from outside world. Encapsulation can be called as the core concept of OOP because it is encapsulation that reduces the maintenance burden, and limiting your exposure to vulnerabilities.
  • 8. Inheritance in C++ This technique also supports the hierarchical classification in which each object would not need to be redefined by all its characteristics explicitly. It prevents the programmer from unnecessary work and it is the inheritance concept that does this job. Polymorphism in C++ Polymorphism,means the ability To take more than one works. Polymorphismc may be:- 1.Operator overloading 2Funtion overloading
  • 9. Abstraction in c++ Abstraction refers to the act of representing essential features Without including the background detailsor explanations. Let's take one real life example of a TV, which you can turn on and off, change the channel, adjust the volume, and add external components such as speakers, VCRs, and DVD players, BUT you do not know its internal details, that is, you do not know how it receives signals over the air or through a cable, how it translates them, and finally displays them on the screen.
  • 10. 2.CLASSES AND OBJECTS CLASSES When you define a class, you define a blueprint for a data type. This doesn't actually define any data, but it does define what the class name means, that is, what an object of the class will consist of and what operations can be performed on such an object. class box { double length; double breadth; double height; };
  • 11. OBJECTS A class provides the blueprints for objects, so basically an object is created from a class. We declare objects of a class with exactly the same sort of declaration that we declare variables of basic types. box b1;//1st object of box box b2;//2nd object of box
  • 12. 3.FUNTIONS A function is a group of statements that together perform a task. Every C++ program has at least one function, which is main(), and all the most trivial programs can define additional functions. The C++ standard library provides numerous built-in functions that your program can call. For example, function strcat() to concatenate two strings, function memcpy() to copy one memory location to another location and many more functions. SYNTAX:- Return-type function name(Arguments) { Body of the funtions }
  • 13. 4.CONSTRUCTOR AND DESTRUCTOR CONSTRUCTOR A class constructor is a special member function of a class that is executed whenever we create new objects of that class. A constructor will have exact same name as the class and it does not have any return type at all, not even void. Constructors can be very useful for setting initial values for certain member variables. DESTRUCTOR A destructor is a special member function of a class that is executed whenever an object of it's class goes out of scope or whenever the delete expression is applied to a pointer to the object of that class. A destructor will have exact same name as the class prefixed with a tilde (~)
  • 14. 5.OPERATOR OVERLOADING AND TYPE CONVERSION OPERATOR OVERLOADING Overloaded operators are functions with special names the keyword operator followed by the symbol for the operator being defined. Like any other function, an overloaded operator has a return type and a parameter list. box operator+(int box) TYPE CONVERSION Implicit conversions do not require any operator. They are automatically performed when a value is copied to a compatible type. For example: short a=2000; int b; b = (int) a; // c-like cast notation b = int (a); // functional notation
  • 15. 6.INHERITANCE Inheritance allows us to define a class in terms of another class, which makes it easier to create and maintain an application. This also provides an opportunity to reuse the code functionality and fast implementation time. When creating a class, instead of writing completely new data members and member functions, the programmer can designate that the new class should inherit the members of an existing class. This existing class is called the base class, and the new class is referred to as the derived class. Eg:- class derieved class:acess specifier base class
  • 16. 7.THIS POINTER AND VIRTUAL FUNCTION POINTER Every object in C++ has access to its own address through an important pointer called this pointer. The this pointer is an implicit parameter to all member functions. Therefore, inside a member function, this may be used to refer to the invoking object. Friend functions do not have a this pointer, because friends are not members of a class. Only member functions have a this pointer. VIRTUAL FUNTION A virtual function is a member function that is declared within a base class and redefined by a derived class. To create virtual function, precede the function’s declaration in the base class with the keyword virtual. When a class containing virtual function is inherited, the derived class redefines the virtual function to suit its own needs.
  • 17. 8.WORKING WITH FILES we have been using the iostream standard library, which provides cinand cout methods for reading from standard input and writing to standard output respectively. This tutorial will teach you how to read and write from a file. This requires another standard C++ library called fstream, which defines three new data types: ofstream This data type represents the output file stream and is used to create files and to write information to files. ifstream This data type represents the input file stream and is used to read information from files. fstream This data type represents the file stream generally, and has the capabilities of both ofstream and ifstream which means it can create files, write information to files, and read information from files.
  • 18. 9.TEMPLATES Templates are the foundation of generic programming, which involves writing code in a way that is independent of any particular type. A template is a blueprint or formula for creating a generic class or a function. The library containers like iterators and algorithms are examples of generic programming and have been developed using template concept. There is a single definition of each container, such as vector, but we can define many different kinds of vectors for example, vector <int> or vector <string>. template <class type> ret-type func-name(parameter list) { // body of function }
  • 19. 10.EXCEPTION HANDLING An exception is a problem that arises during the execution of a program. A C++ exception is a response to an exceptional circumstance that arises while a program is running, such as an attempt to divide by zero. Exceptions provide a way to transfer control from one part of a program to another. C++ exception handling is built upon three keywords: try, catch, andthrow.  throw: A program throws an exception when a problem shows up. This is done using a throw keyword.  catch: A program catches an exception with an exception handler at the place in a program where you want to handle the problem. Thecatch keyword indicates the catching of an exception.  try: A try block identifies a block of code for which particular exceptions will be activated. It's followed by one or more catch blocks.
  • 20. Assuming a block will raise an exception, a method catches an exception using a combination of the try and catch keywords. A try/catch block is placed around the code that might generate an exception. Try { // protected code } catch( ExceptionName e1 ) { // catch block } catch( ExceptionName e2 ) { // catch block } catch( ExceptionName eN ) { // catch block }