1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zheka24 [161]
4 years ago
11

Explain the concepts o f polymorphism, Encapsulation, Inheritance in detail with suitable examples?

Computers and Technology
1 answer:
levacccp [35]4 years ago
8 0

Answer:

Encapsulation:-It is the binding of the data and functions so that they works as one unit.

Inheritance:-When one class acquires the property of another class it is called inheritance.

Polymorphism :-It generally means more than one form

Explanation:

Encapsulation:- class is an example of encapsulation it can hold different data types and functions in a single container called class.

class Name{

public:

string first_name;

string last_name;

void Display()

{

cout<<first_name<<" "<<last_name<<endl;

}

};

Inheritance:-The property of a class acquiring the properties of another class is called inheritance.

Now we will inherit the above defined class.

class person: public Name

{

public:

char gender;

int age;

void Display()

{

cout<<first_name<<" "<<last_name<<gender<<age<<endl;

}

};

int main()

{

Name n;

person p;

n.Display();

p.Display();

}

Polymorphism- There are two types of polymorphism:-

1.Run time polymorphism=The values are decided at run time.

2.Compile time polymorphism=The values are decided at compile time.

Example:-In the above example we have function Display() in both the classes.This is an example of compile-time polymorphism. We are deciding at the time of compilation which display to use.

You might be interested in
What is a blog . explain with example clearly .​
const2013 [10]

Answer:

A blog (a truncation of "weblog") is a discussion or informational website published on the World Wide Web consisting of discrete, often informal diary-style text entries (posts). Posts are typically displayed in reverse chronological order, so that the most recent post appears first, at the top of the web page.

Explanation:

3 0
3 years ago
A(n) ___ converts between digital data the computer understands and analog signals that are transmitted over telephone or cable
zhannawk [14.2K]
A modem is probably what you are looking for.
3 0
3 years ago
The illustration shows different types of text language. Thought and speech bubbles labeled as follows: p l s, A S A P (all caps
Otrada [13]

Answer:

the answer to your question would be keeping content appropriate

Explanation: hope i helped <3 : )

8 0
3 years ago
Read 2 more answers
A user needs to open some files that are being shared from a remote computer. however, the user receives an "access denied" mess
scoundrel [369]
Hes not a member of the group that has been granted access to view the files
5 0
4 years ago
Which term is used to describe a computer-based method of communication in which users can type and view informal messages sent
Vsevolod [243]
The answer is instant messaging (IM).  This  is used to describe a computer-based method of communication in which users can type and view informal messages sent to one or more recipients, and view the responses immediately.  Instant Messaging (IM) <span>is a type of online chat that offers real-time text transmission over the Internet. </span>
3 0
4 years ago
Other questions:
  • Robin ensures that she is always available if anyone in the team needs her. Which quality is shown by robin?
    9·2 answers
  • An image that has been saved in Tagged Image File Format (or .TIF) is A. readable only by Windows personal computers. B. a recto
    6·1 answer
  • Joe, a user, reports to the help desk that he can no longer access any documents on his PC. He states that he saw a window appea
    7·1 answer
  • A school operated for the express purpose of giving its students the skills
    6·1 answer
  • . Each ____ on a menu performs a specific action.
    14·1 answer
  • Identify a characteristic of electronic meeting systems.
    10·1 answer
  • 3. State whether the given statements are true or false. a. The computer is called a data processor because it can store, proces
    13·1 answer
  • Name at least 3 different portable computer devices that can be purchased
    15·2 answers
  • REAL ANSWERS ONLY!!! BRAINLLIEST AND 50 POINTS FOR BEST ANSWER
    11·2 answers
  • State the difference between font colour and shading.​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!