Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ Given the declaration statements below in a driver, for each set of instructions indicate by circling the appropriate choice whether - there will be

c++ image text in transcribed
image text in transcribed Given the declaration statements below in a driver, for each set of instructions indicate by
circling the appropriate choice whether
- there will be a compilation error (C), and the reason for it OR
- there will be no error at all (OK) in which case specify the resulting output and explain your answer.
Declaration Statements:
2-a) Transportation *t=new Transportation();
coutprint();
O Compiler error Explain
O Ok Possible output? Explain
2-b) SportsCar *s;
s=new SportsCar(2, "porche");
s->move;
O Compiler error Explain
O Ok Possible output? Explain
2-c) Car *c=new Car(4,"Tesla");
SportsCar *s;
s=c;
c->move();
O Compiler error Explain
O Ok Possible output? Explain
2-d) Car *c;
SportCar *s=new SportCar(4, "chevrolet");
c=s;
s->move();
O Compiler error Explain
O Ok Possible output? Explain
2-e) Car *c;
SportsCar *s=new SportsCar(4,"chevrolet");
c=s;
c->displayMake();
O Compiler error Explain
O Ok Possible output? Explain
Given the following Given the declaration statements below in a driver, for sachset of instruction indicate by ciding the appropriate choice whether There will be a completion of Cand the reason for OR . there will be no morat al (OK) in which case specity the ring output and explain your Declaration Statements 24) Transportation new Transporto couter Compiler error Explain ook Possible output? Explain 2-) Sports Cars sene SportsCat. perche Compiler error Explain ook Possible output? Explain 2) Cat 'new Carteles Sports Cars Compiler error Explain O OM Possible output? Explain SponCarew Soon Card chevrolex O Compiler error Explain OOK Possible output? Explain Sports Car SportsCard chee display Compler error Explain Possible output? Explain class Transportation protected: int capacity: public: Transportation() { capacity-e; > Transportation(int cap){ capacity-cap; 3 "getters and setter virtual vold move() - ; void print cout virtual vold move() { cout Transportation(int cap){ capacity-cap; 3 "getters and setter virtual vold move() - ; void print cout virtual vold move() { cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago