Test: Computer Science

Consider the following C++ pseudocode:

 

Class Car {

const int wheels = 4;

float milesPerGallon;

string make;

string model;

}

 

Car sportscar = new Car;

1.

What is the difference between the class car, and the object sportscar?

Car is instantiated from sportscar.

They have no relation.

sportscar is instantiated from Car.

They are the same.

They are both instantiated from something else.

1/2 questions

0%
Learning Tools by Varsity Tutors