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
Aleonysh [2.5K]
3 years ago
7

Write a C++ Programm in which inheritance is used

Computers and Technology
1 answer:
geniusboy [140]3 years ago
8 0

Answer:

// C++ program to demonstrate inheritance

#include <iostream>

using namespace std;

// base class

class Animal {

  public:

   void eat() {

       cout << "I can eat!" << endl;

   }

   void sleep() {

       cout << "I can sleep!" << endl;

   }

};

// derived class

class Dog : public Animal {

  public:

   void bark() {

       cout << "I can bark! Woof woof!!" << endl;

   }

};

int main() {

   // Create object of the Dog class

   Dog dog1;

   // Calling members of the base class

   dog1.eat();

   dog1.sleep();

   // Calling member of the derived class

   dog1.bark();

   return 0;

}

You might be interested in
When you’re in the Normal view, what are the visible panes?
zheka24 [161]

a

pleas give branlest

6 0
3 years ago
Read 2 more answers
Every telecommunication setup uses two devices: one device to transmit data and one device to receive data. Which device transmi
alexandr1967 [171]

Answer:

Cell.

Explanation:

Electromagnetic waves is a propagating medium used in all communications device to transmit data (messages) from the device of the sender to the device of the receiver.

Generally, the most commonly used electromagnetic wave technology in telecommunications is radio waves.

Radio waves can be defined as an electromagnetic wave that has its frequency ranging from 30 GHz to 300 GHz and its wavelength between 1mm and 3000m. Therefore, radio waves are a series of repetitive valleys and peaks that are typically characterized of having the longest wavelength in the electromagnetic spectrum.

Basically, as a result of radio waves having long wavelengths, they are mainly used in long-distance communications such as the carriage and transmission of data.

In the field of telecommunication, all telecommunication setup are designed and developed to make use of two network devices: one device is typically used for the transmission of data while the other device is used to receive data that are sent on the network.

Generally, cell towers are tall poles that are used to transmit frequencies to mobile phones.

3 0
3 years ago
Digital learning can help students who enjoy
mr Goodwill [35]

Answer:

flexibility and independence

Explanation:

6 0
2 years ago
In the code below, what's the final value of the variable x?
Lana71 [14]

Answer:

First equation x=4

second equation x=3

Explanation:

The question is telling us that 'X' is equal to 8. It's another way of representing this number using X as the variable replacing it.

We input 8 instead of the X to solve the equation, and here in the picture, you can see where I went from there.

Do the same thing for the other equation.

I hope this helps :)

3 0
2 years ago
John was teaching his students about the basics of computer hardware and software. By the end of his lecture, he asked his class
vredina [299]
A CPU is the electronic circuitry within a computer that carries out the instructions of a computer program by performing basic arithmetic logical, control and input/output operations specified by the instructions.
Knowing this, the answer is both C - That it coordinates the flow of instructions and data within computers, And A - That a control unit performs arithmetical and logical computations.
If you can only select one answer, I'd personally go with A.
4 0
3 years ago
Read 2 more answers
Other questions:
  • .2. What approach to deviance do you find most persuasive: that
    9·1 answer
  • A model release can be either oral or written down. true or false
    11·2 answers
  • 5. How should you use LinkedIn Answers as a professional?
    8·1 answer
  • The ____ developed numerical methods for generating square roots, multiplication tables, and trigonometric tables used by early
    12·1 answer
  • Why is it important to put the most specific case first? What types of errors does it help avoid?
    11·1 answer
  • Your program analyzes complex data.
    10·1 answer
  • Order the steps to use a logical argument as a rule type.
    15·2 answers
  • why does planets orbit the sun? asap i give brainlist i know it on that subject i dont know what else goes with it
    10·1 answer
  • B. WAP to check whether input number is palindrome number or not using SUB...... END SUB.​
    15·1 answer
  • Common names for computer-based information systems are transaction processing, management information, ________, and executive
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!