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]
3 years ago
11

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

Computers and Technology
1 answer:
levacccp [35]3 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
. Imagine that you were programming without an IDE. What problems might you encounter?​
Sergeu [11.5K]

Answer:

Can't run the program, Can't see syntax error

Explanation:

If you are doing programming without IDE you can see 2 major problems. They are:

1: Can't run it: If you do not have any IDE and doing programming you will able be able to run it. Means you can't see its output.

2: Can't see syntax error: If you do programming without any IDE you can't see its errors. I mean you will not be able to see that where you have made errors.

According to me, these are the 2 major problems you will face when you do programming without any IDE.

4 0
2 years ago
Index addressing is for traversing arrays.<br><br> True<br><br> False
valina [46]

Answer:

False.

Explanation:

Index addressing is not for only traversing the arrays but to also access the element,manipulate them.Though indexing is also used in traversing but it is not solely for that.Indexing in an array starts from 0 to size-1.

for example:-

We have an array a of size 10.So to access the element at position 6.We have to write.

a[5];

Manipulating it

a[5]=6;

8 0
3 years ago
14. The heart of a computer is<br> a CPU<br> b. Memory<br> c. I/O Unit<br> d. Disks
NNADVOKAT [17]

Answer:

CPU

I dont know a whole ton about computers. But I'm confident this is correct. Without the CPU the other options on this list wouldnt work so the CPU would be the "heart".

3 0
3 years ago
Is it safe to turn on a computer without ram?
swat32
Well, it is safe to turn a computer on without a RAM, but you can't really do it. RAM is one of the essential components in computers without which you can't really use a computer. You can turn it on, however, nothing will appear on your screen and the system won't boot. So, technically, it is safe, but it won't do anything to your computer as it cannot run without RAM.
4 0
3 years ago
Read 2 more answers
What is the function of the kernel of an operating system? It is an application that allows the initial configuration of a Cisco
Phoenix [80]

Answer:The kernel provisions hardware resources to meet software requirements.

Explanation: Kernel is the program which behaves as the central component of the operating system.The main purpose of the kernel is to control the operation of the system to manage it.

Monolithic kernel and micro-kernel are two types of kernel units present in the computer system where they work for fulfilling the software requirement by attaching it to the hardware parts.

Other option are incorrect because it does not work for Cisco device, does not perform any specific feature only , no linkage is created between the hardware and the electronics nor reacts as navigation bar.

3 0
3 years ago
Other questions:
  • Why does the hp computer not have Bluetooth?
    6·1 answer
  • Running fewer applications at once is a way to resolve which type of bottleneck?
    9·1 answer
  • Which one of the following is an example of hacktivism according to you and why?
    11·1 answer
  • Which software can managers use to discuss financial performance with the help of slides and charts?
    7·2 answers
  • Can anyone help me with getting bash ubuntu on windows setup?
    15·1 answer
  • To save a file so that it can be opened on most computers, select the ____ option.
    10·2 answers
  • VOTE!
    11·1 answer
  • Which protocol sends a request to view or download a website or file ​
    7·1 answer
  • Explain the computer according to size​
    10·1 answer
  • A friend of mine had a samsung j2 phone and someone with a iphone placed something in her phone she thought was malware in her p
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!