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
Exam (elaborations)

CONCEPT OF OOPS IN C ++

Rating
-
Sold
-
Pages
2
Grade
A+
Uploaded on
04-03-2023
Written in
2022/2023

GIVE BEST KNOWLEDGE FROM BASIC ,BRIEF DISUCSSION ON ALL THE FOUR CONCEPTS OF OOPS WHICH HAS MAXIMAM CHANCE TO COME IN ANY DEGREE CORCES WHICH HAVE OOPS CONCEPT AND THAT NOTES GIVES YOU FULL MARKS ON THIS TOPIC

Institution
Course

Content preview

4 Pillars of OOPs Concept -
Inheritance, Polymorphism,
Encapsulation & Abstraction
The worlds leading project driven platform. All programs come with
one week free trail , there are assured scholarship also. There is a
fellowship program also , where placement is guaranteed That you will
be placed in a product based company. Crio is the place for you to
master development. Encapsulation is wrapping of data members and
functions into single entity. In fully encapsulation all the data
members are marked private. The advantages include being able to
hide data. If I marked it private, then no other class can access the
level or numbers. If this class name is hero, then can I directly access
Hero. name or Hero. level. So you have marked all these members as
private. We will talk about the 2nd concept , Inheritance What is
inheritance ? Lets take a example , your one relative said your height
is same as your father , your father is tall so your are also tall. If your
mom 's hair is silky and you have also silky hair, you have inherited
this In same way here also inheritance is the same thing There will be
a class , it will have some properties , behaviour , and you will inherit
it in any other class.

In public mode. you have to specify the access modifier , then the
parent class name. These 3 ere the modes , which we have already
discussed. Lets 1st inherit in public mode and see how it works. In
male there is no such thing , there is only colour. All properties and
functions of Human class will be inherited to male class. For any
attribute there will be an access modifier. If any attribute is public in
base class And I have inherited it in public mode in male class, then it
will be public in your class also If there is an entity which is private
here , and you have inherited. it is not accessible in this mode. If
anything is marked private in base class and you are inheriting it in a
public way, then it will be not accessible. In case of protected, in super
class it is marked protected and public. If you are accessing it in
protected way then your answer will be protected. If your attributes
are marked private now, public, or protected, or private. In all cases it
will give not accessible in all cases.

If a super class is public and its mode of inheritance is private, then
your height will also become private. In this case, your height is
marked public and you have inherited it privately. This means you can
access it in your own class. but not outside but there is one condition.
Your child/derived class can also access it. If my height is marked
protected In main class height is protected, and I have inherited it in
public mode. In case of private , no matter which ever case you use , it
is not accessible. In short we know that. if anything is private , and I

Written for

Institution
Course

Document information

Uploaded on
March 4, 2023
Number of pages
2
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$3.49
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
atulgupta

Get to know the seller

Seller avatar
atulgupta siddharth international
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
3
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

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