Implement a class Car that models a car. The class should have the following properties:
The class should have the following methods:
In the main function, create an instance of the Car class and call the Drive and DisplayInfo methods to demonstrate their functionality.
We set up an online IDE for you to solve the problem. Here's a link to the practice environment and here's a link to the solution. Click fork this to create a copy of the file that you can make changes to. Make sure to try the problem out before looking at the solution!
Create a class called "DynamicArray" that contains the following attributes:
The class should have the following methods:
Use the class in a program that creates an instance of the class and sets the size of the array. The program should then fill the array with the squares of the indices and display the elements of the array.
Example output: Array elements: 0 1 4 9 16 25 36 49 64 81 100
We set up an online IDE for you to solve the problem. Here's a link to the practice environment and here's a link to the solution. Click fork this to create a copy of the file that you can make changes to. Make sure to try the problem out before looking at the solution!