Complete program for Vehicle class

완료 등록 시간: Dec 8, 2013 착불
완료 착불

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();

}

C++ 프로그래밍

프로젝트 ID: #5210026

프로젝트 소개

5 건(제안서) 재택 근무형 프로젝트 서비스 이용 중: Dec 8, 2013

수상자:

vano101

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

$11 USD (1일 이내)
(170건의 리뷰)
5.9

이 일자리에 대한 프리랜서 5 명의 평균 입찰가: $27

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 (1일 이내)
(111 리뷰)
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 (0일 이내)
(6 리뷰)
3.9
michaelobusek

A proposal has not yet been provided

$30 USD (3일 이내)
(1 리뷰)
2.2
wittgensteinz

A proposal has not yet been provided

$35 USD (1일 이내)
(0 리뷰)
0.0
abbaspalash

A proposal has not yet been provided

$33 USD (1일 이내)
(0 리뷰)
0.0