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
jeka57 [31]
3 years ago
5

Among object-oriented languages, one feature that varies considerably is whether the language allows multiple inheritance. C++ d

oes but Ada does not. Java takes a middle ground approach of allowing multiple inheritance of interfaces but not classes. Using a C++ example, illustrate some of the complexities that multiple inheritance introduces. How does C++ deal with them? Why does Java's middle ground approach offer some of the benefits of multiple inheritance while avoids its problems.
Computers and Technology
1 answer:
Amiraneli [1.4K]3 years ago
4 0

Multiple inheritance causes Diamond problem which happens when:

Class A is parent of class B and C

Now when class D will be inherited from both Class B and C it will have all the members of class A and B which if same will confuse the compiler to import which one?

C++ solves it by using virtual keyword with them and thus telling the compiler which one to inherit.

Java has introduced the interface concept rather then allowing multiple inheritance.

You might be interested in
How can a cell phone tower help people​
Sveta_85 [38]

Answer:

Whenever you use your mobile phone to make a call, it emits electromagnetic radio waves also known as radio frequency or RF energy. Once the radio waves are emitted, the antenna from the nearest cell phone tower will receive them. The antennas of a cell tower can both transmit and receive signals from mobile phones.

6 0
4 years ago
Read 2 more answers
Write a program that converts degrees Fahrenheit to Celsius using the following formula. degreesC = 5(degreesF – 32)/9 Prompt th
weeeeeb [17]

Answer:

Written in Python

import math

degreesF = float(input("Enter a temperature in degrees Fahrenheit: "))

degreesC = round(5 * (degreesF - 32)/9,1)

print(degreesC)

Explanation:

The following header allows you to use Math.Round() method in Python

import math

The following prompts the user for temperature in degrees Fahrenheit

degreesF = float(input("Enter a temperature in degrees Fahrenheit: "))

The following calculates the degree Celsius equivalent and also round it up

degreesC = round(5 * (degreesF - 32)/9,1)

The following prints the degree Celsius equivalent

print(degreesC)

5 0
3 years ago
your computer running Windows 10 is doing some very strange things with operating system you are fairly certain it is not a hard
AlekseyPX
It might be a virus, when my computer starts going crazy i just bought a fixme stick and they work amazing or trying getting an expert to fix it if it worse
6 0
3 years ago
Read 2 more answers
Evaluate means having a preference for one thing over another in a way that's unfair.
Zinaida [17]

Answer: False

Explanation:

Bias is have preferences for one thing over another in a way that's unfair.

4 0
3 years ago
A security system uses sensors at every door and window which will set off an alarm if any one of them is opened. There is also
AnnyKZ [126]
You have a raspberry pi connected to all the sensors and a code running to  trigger if the sensors are triggered. Each sensor and keypad would run to a different input on the pi. They should al be able to be powered with a single cell lipo. Is that what you are asking?
5 0
3 years ago
Other questions:
  • Given two int variables, i and j, which have been declared and initialized, and two other int variables, itemp and jtemp, which
    14·1 answer
  • Ponce is the largest city on which coast of Puerto Rico
    13·1 answer
  • Refer to the exhibit. A network administrator configures a named ACL on the router. Why is there no output displayed when the sh
    7·1 answer
  • What is the area of a triangle whose base is 14 m and whose height is 22 m?
    7·1 answer
  • Pick an appliance or an electronic device that you use at home that is powered from the wall outlet. Specify which electronics d
    10·1 answer
  • The carbon-14 isotope is important because it allows scientists to determine the ___________ of an organic sample.
    14·1 answer
  • What is the purpose of the domain name? The domain name is an example of a service provider. The domain name .gov.nz is an examp
    15·2 answers
  • What is ana absolute adress
    11·1 answer
  • What type of computer system can be found in the computer lab at school?
    14·1 answer
  • What is table,form,query and report ?short ans​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!