Question: Please answer in C++ trail na.h #include car.h using namespace std; #ifndef TRAIN H #define TRAIN H class Train t private: Car tHea Car tTail


Please answer in C++
trail na.h #include "car.h" using namespace std; #ifndef TRAIN H #define TRAIN H class Train t private: Car tHea Car tTail public Train NT Trail int getLength const void addCarFront (Car void add CarBack (Ca void del double determineMaxSpeed const void remove CarsOfType (const string &) Display list car by car name Car name Car void display() const #endif train cpp: void Trail addCarBac Car toAdd t if (x 0) k( toAdd toAdd else t y- nextCar toAdd toAdd car. h: #ifndef CAR H #define CAR H using namespace std; class Car private string name; double maxSpeed; public Car nextCar public Car name "generic", speed: 75 Car (strin double get MaxSpeed() const string getName const void setName const string &) class EngineCa public Car private double fuelCapacity; double fuelRemaining; public Engine Car(); name engine speed 100 class Peop leCa public Car private int numSeats int num People; public People Car(); name people speed 50 #endif
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
