Complete program for Vehicle class

Përfunduar Postuar Dec 8, 2013 Paguhet në dorëzim
Përfunduar Paguhet në dorëzim

Create and write member functions for an abstract Vehicle class. The class should contain:

• Data members to store the number of wheels and the color of the Vehicle

• Any necessary constructors or destructor

• A non-virtual accessor function, numWheels(), to return the number of wheels

• A virtual function, iAmA(), that returns a const char* or a string, “vehicle”

• A pure virtual function, usage() that prints “I am used to __________”

Create and write member functions for a Bike class. The class should be derived from the vehicle class. The Bike class should have a default 2 wheels. Add the necessary functions. Override the iAmA() function so that it returns “bike”. The usage() function should print “I am used to ride”.

Create and write member functions for a Car class. The class should be derived from the vehicle class. The Car class should have a default 4 wheels. Add the necessary functions. Do not override the iAmA(). The usage() function should print “I am used to drive”.

Use this main() to demonstrate your classes:

int main()

{

Bike B(“blue”);

Car C(“red”);

Vehicle* pv;

cout << [url removed, login to view]() << endl;

cout << [url removed, login to view]() << endl;

[url removed, login to view]();

pv = &B;

cout << pv->numWheels() << endl;

cout << pv->iAmA() << endl;

pv->usage();

pv = &C;

cout << pv->numWheels() << endl;

cout << pv->iAmA() << endl;

pv->usage();

}

Programim në gjuhën C++

ID Projekti: #5210026

Rreth projektit

5 propozimet Projekti në distancë Aktiv Dec 8, 2013

Është zgjedhur fitues:

vano101

There is chance to complete this task in hour or two, maybe even sooner.................................................

$11 USD për 1 ditë
(170 Përshtypje)
5.9

5 profesionistë freelancer dërguan një ofertë mesatare prej $27 për këtë punë

dobreiiita

Hello, I am C++ expert and can surely help you here with this project, Please let me know if you are interested. Thank You

$30 USD për 1 ditë
(111 Përshtypje)
5.9
DucNA

Hi there, I've read your requirement. Please go to my page to get more review about me. Let's discuss right now. Thanks and best regards, Duc Nguyen

$30 USD për 0 ditë
(6 Përshtypje)
3.9
michaelobusek

A proposal has not yet been provided

$30 USD për 3 ditë
(1 përshtypje)
2.2
wittgensteinz

A proposal has not yet been provided

$35 USD për 1 ditë
(0 Përshtypje)
0.0
abbaspalash

A proposal has not yet been provided

$33 USD për 1 ditë
(0 Përshtypje)
0.0