Question
Hello! Could I get some help on this project? Thank you! Proj6.cpp (as mentioned in project instructions): /* This file is a test driver for
Hello! Could I get some help on this project? Thank you!
Proj6.cpp (as mentioned in project instructions):
/* 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;
}
CS 202 - Computer Science II Project 6 Due date (FIXED): Wednesday, 3/14/2017, 11:59 pm 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 theStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started