Computer Science › Object-Oriented Development
Consider the following C++ pseudocode:
Class Car {
const int wheels = 4;
float milesPerGallon;
string make;
string model;
}
Car sportscar = new Car;
What is the difference between the class car
, and the object sportscar
?
Consider the following JAVA code:
**public static void main(String[] args)**
**{**
**double number1 = 99.05;**
**int number2 = (int) number1;**
**System.out.println("number1 = " + number1);**
****System.out.println("number2 = " + number2);**
**}**
What would be the console output?