Question: Can you please help me with this? its for C++ !! WIll give thumbs up! SAMPLE CODE BELOW SAMPLE CODE /** * @brief CS-202 Project
Can you please help me with this? its for C++ !! WIll give thumbs up! SAMPLE CODE BELOW






![float lla_rno[3] = {39.54, 119.82, 4500.0}; Car c_rno(lla_rno); cout Car c_cpy( c_rno](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f38dd6781aa_58966f38dd5e4a58.jpg)
SAMPLE CODE
/**
* @brief CS-202 Project 6 Test Driver
* @date Summer, 2018
*
* This file is a test driver for the Polymorphic classes prescribed in
Project 6 of CS-202
*/
#include
#include "Car.h"
using namespace std;
int main(){
cout
"//////////////////////////////// "
"///// Constructor Tests ///// "
"////////////////////////////////"
cout
Car c1;
cout
float lla_rno[3] = {39.54, 119.82, 4500.0};
Car c_rno(lla_rno);
cout
Car c_cpy( c_rno );
cout
c1 = c_cpy;
cout
"///////////////////////////////// "
"///// Polymorphism Tests ///// "
"/////////////////////////////////"
cout
Objects"
float lla_new[3] = {37.77, 122.42, 52.0};
c1.Move( lla_new );
cout
Objects"
cout
// Just setting some distinct values to our objects again here
float lla_ny[3] = {40.71, 74.00, 10.0};
c1.SetLLA( lla_ny );
float lla_la[3] = {34.05, 118.24, 71.01};
c_cpy.SetLLA( lla_la );
cout
"/////////////////////////////////////////////////// "
"///// Polymorphic Base Class Pointer Tests ///// "
"///////////////////////////////////////////////////"
Vehicle* vehicles_array[3];
vehicles_array[0] = &c1;
vehicles_array[1] = &c_rno;
vehicles_array[2] = &c_cpy;
cout
for (int i=0; i
vehicles_array[i]->Move( lla_new );
}
cout
Pointers"
for (int i=0; i
cout
}
cout
"//////////////////////////// "
"///// Tests Done ///// "
"////////////////////////////"
return 0;
}
Objectives: The main objectives of this project is to test your ability to create and use polymorphism with C++ classes. A review of your knowledge to manipulate classes with multiple constructors, static members/functions, operator overloading, inheritance, as well as pointers, structs, arrays, iostream, file I/O and C-style strings is also included. Description: For this project you may use square bracket-indexing, pointers, references, all operators, as well as the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
