Write a c++ program | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

Write a c++ program

Write a c++ program that create a base class called dist that states the distance between two points in a double variable, in dist , create a virtual function called trav_time() that outputs the time it takes to travel that distance, assuming that the distance is in miles and the speed is 60 miles per hour. In a derived class called metric, override trav_time() so that it outputs the travel time assuming that the distance is in kilometers and the speed 100 kilometers per hour.

16th Jan 2017, 5:14 PM
Mohammad Touhidul Islam
Mohammad Touhidul Islam - avatar
1 Respuesta
0
Can you please elaborete it please?
12th Jun 2017, 11:53 AM
vardhan_11