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

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:30
4.11 painting a wall (1) prompt the user to input integers for a wall's height and width. calculate and output the wall's area (integer). note that in this case there is a new line after each prompt. (submit for 1 point). enter wall height (feet): 11 enter wall width (feet): 15 wall area: 165 square feet (2) extend to also calculate and output the amount of paint in gallons needed to paint the wall (floating point). assume a gallon of paint covers 350 square feet. store this value in a variable. output the amount of paint needed using the %f conversion specifier. (submit for 2 points, so 3 points total). enter wall height (feet): 11 enter wall width (feet): 15 wall area: 165 square feet paint needed: 0.471429 gallons (3) extend to also calculate and output the number of 1 gallon cans needed to paint the wall. hint: use a math function to round up to the nearest gallon. (submit for 2 points, so 5 points total). enter wall height (feet): 11 enter wall width (feet): 15 wall area: 165 square feet paint needed: 0.471429 gallons
Answers: 3
question
Computers and Technology, 22.06.2019 01:40
When the pc version of the spreadsheet program became available, the ibm pc quickly became the top-selling personal computer?
Answers: 3
question
Computers and Technology, 23.06.2019 01:00
Complete the sentence about a presentation delivery method
Answers: 2
question
Computers and Technology, 23.06.2019 19:30
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a,b] se pot scrie ca produs de două numere prime? “.
Answers: 1
You know the right answer?
Create a class Car, which contains Three data members i. e. carName (of string type), ignition (of b...
Questions
question
Biology, 02.03.2020 21:52
question
Mathematics, 02.03.2020 21:52
question
Spanish, 02.03.2020 21:52
Questions on the website: 13722362