subject

Create a class Car, which contains Three data members i. e. carName (of string type), ignition (of bool type), and currentSpeed (of integer type)  A no-argument constructor to initialize all data members with default values
 A parameterized constructor to initialize all data members with user-defined values
 Three setter functions to set values for all data members individually
 Three getter function to get value of all data members individually
 A member function setSpeed( ) // takes integer argument for setting speed
Derive a class named Convertible that contains
 A data member top (of Boolean type)
 A no-argument constructor to assign default value as “false” to top
 A four argument constructor to assign values to all data-members i. e. carName, ignition, currentSpeed and top.
 A setter to set the top data member up
 A function named show() that displays all data member values of invoking object
Write a main() function that instantiates objects of Convertible class and test the functionality of all its member functions.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:10, lberman2005p77lfi
The total cost of textbooks for the term was collected from 36 students. create a histogram for this data. $140 $160 $160 $165 $180 $220 $235 $240 $250 $260 $280 $285 $285 $285 $290 $300 $300 $305 $310 $310 $315 $315 $320 $320 $330 $340 $345 $350 $355 $360 $360 $380 $395 $420 $460 $460
Answers: 2
image
Computers and Technology, 24.06.2019 05:30, MOONCHILDSUGA
If you combine two cells into one, what action are you performing? a.  adding a new row or column      b.  splitting the cells      c.  removing a new row or column      d.  merging the cells
Answers: 2
image
Computers and Technology, 24.06.2019 21:00, genyjoannerubiera
When replacing a thermostat or water pump, coolant drained from the cooling system should be
Answers: 1
image
Computers and Technology, 25.06.2019 10:00, Lindseycline123
*jenny is preparing a presentation on the health statistics of the 10 most populated countries. she wants to apply a blinking effect to the names of the countries, and a motion effect between the exit and entry of every slide. which options should she use? jenny should use the option to apply a special blinking effect to the names of the countries and the option to apply a motion effect between the exit and entry of every slide.
Answers: 2
You know the right answer?
Create a class Car, which contains Three data members i. e. carName (of string type), ignition (of b...

Questions in other subjects:

Konu
Mathematics, 28.09.2021 18:00