Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

C++ LANGUAGE

Rating
-
Sold
-
Pages
47
Uploaded on
25-07-2024
Written in
2023/2024

It is a document depending on a c language which is a course regarding software. The document has detalied explained about c++ which is mainly used by softwares.

Institution
Course

Content preview

C++ LANGUAGE
• INTRODUCTION:
C++ is an object-oriented programming language; it was developed by
Bjarne Stroustrup at "AT&T" bell laboratories in the early of 1980's.

• Heritage of C++ :
In C++, the features of C and Simula 67 are combined. Therefore, C++
is an extension of C with a major addition of the class construct feature
of "Simula 67". Since the class was major addition to the original major C
language, it is called as "C with classes". However later in 1983, the
name was changed to C++. The idea of C++ comes from the 'C'
increment operator "++", there by suggesting that C++ is an
incremented version of 'C'.

• Object Oriented Program :
It is methodology or technology to write a program. If any language
supports the features of object-oriented programming, then that language
is called as 'Object Oriented Programming' language.
• Features of Object-oriented programming :
1. Objects
2. Classes
3. Encapsulation
4. Abstraction
5. Inheritance
6. Polymorphism
7. Message Communication
• Objects :

,Object is a run time entity which is an instance of class. Object consists of
some properties and some behaviors. Properties are represented by
variables and behaviors are represented by functions.
Example: - dog
properties:- color,weight,height,length

behaviors:- run(), eat(), bark (), sleep()

• Class:
Class is a data type (user defined) to declare an object. Class is a model
or blue print or imagination to represent the object. Class also consists of
some properties and some behaviors. properties are represented by
variables, and actions (behaviors) are represented by functions.

Example: - Animal

properties: - color,weight,length,height

behavior's: - run(), sleep(), breath(), eat()



Note: -
Class doesn't exist physically but Object exists physically.

Without Class Object doesn't exist. but without object Class can exist.



Class Object
----------------------------
Animal dog, cat, horse


Flower rose, lily

, • Encapsulation:
Binding or wrapping of data and its functionality inside single unit (class)
is called as Encapsulation.

• Abstraction:
Abstraction is the process of hiding the details and exposing only the
essential features of a particular concept or object.

• Inheritance :
1. Inheritance is the capability of a class to use the properties and
methods of another class while adding its own functionality.
2. Inheritance supports the concept of hierarchical classification.
3. In OOP, the concept of inheritance provides the idea of reusability.
• Polymorphism :

Poly -> many
Morphism -> forms

It is an ability to take more than one form. It places an important role on
allowing objects having different internal structures to show the same
external interface.

• Dynamic Binding :
Dynamic binding means that the code associated with a given procedure
call is not known until the time of the call at the runtime.


Differences between C and C++

, C C++
It is a procedure-oriented It is an Object-Oriented Programming
programming language language.

In procedure oriented, programs In Object Oriented Programs are
are divided into individual divided into objects.
procedures that do different tasks.


Data can be hidden and cannot be
Data can be accessed anywhere. accessed by outside functions.

It is bottom-up approach.
It is top-down approach.
Data and associated operations are
Procedures are independent of combined into a single unit.
each other.
It is easy to use and easy to maintain.
In procedure oriented,
maintenance of a large software
system is risky and costly.


• I/O Stream :
Continuous flow of bytes is called a stream. Streams are classified into
two types.

• Output streams
• Input streams




❖ Output stream:

Written for

Course

Document information

Uploaded on
July 25, 2024
Number of pages
47
Written in
2023/2024
Type
Class notes
Professor(s)
Spandhana sree
Contains
All classes

Subjects

$10.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
spandhanasreepotti

Get to know the seller

Seller avatar
spandhanasreepotti Sri Indu College Of Engineering & Technology
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions