Question: C++ Programming Assignment In Star Wars, there are a multitude of spacecraft, including small fighters (like X-wings) and large capital ships (like Star Destroyers). In

C++

C++ Programming Assignment In Star Wars, there are a multitude of spacecraft,

including small fighters (like X-wings) and large capital ships (like Star Destroyers).

Programming Assignment In Star Wars, there are a multitude of spacecraft, including small fighters (like X-wings) and large capital ships (like Star Destroyers). In this assignment, you will implement four classes: ship, fighter, capital, and fleet. Implement each class following the descriptions. Test your classes with my provided test client - note: make sure to test everything thoroughly, my client may not! ship A ship contains private members for name, length and max_speed o name is a string, length and max_speed are unsigned int. Add public getters and setters for each private member variable Add a print method that prints the details of the ship, following my example output on * Canvas Add a default constructor that sets name to the empty string, and the other member variables to 1 Add a parameterized constructor that sets name, length and max_speed based on the parameters (in that order). Ensure max_speed and length are not 0 fighter Afighter is a ship. A fighter contains additional private members: num lasers, has hyperdrive and laser_color. num lasers is an unsigned int, has hyperdrive is a bool and laser_color is of type color which you must define via an enumerated type Make this enumerated type a public member of the class. The valid colors are red" "green" and "blue." o Add public getters and setters for each private member variable Add a print method that prints the details of the fighter. This should override the ship class print method. Output should follow my example output on Canvas Add a default constructor that sets num lasers to 0, has hyperdrive to false, and laser color to red. Add a parameterized constructor that sets num lasers, has hyperdrive and laser_color (in that order) . Programming Assignment In Star Wars, there are a multitude of spacecraft, including small fighters (like X-wings) and large capital ships (like Star Destroyers). In this assignment, you will implement four classes: ship, fighter, capital, and fleet. Implement each class following the descriptions. Test your classes with my provided test client - note: make sure to test everything thoroughly, my client may not! ship A ship contains private members for name, length and max_speed o name is a string, length and max_speed are unsigned int. Add public getters and setters for each private member variable Add a print method that prints the details of the ship, following my example output on * Canvas Add a default constructor that sets name to the empty string, and the other member variables to 1 Add a parameterized constructor that sets name, length and max_speed based on the parameters (in that order). Ensure max_speed and length are not 0 fighter Afighter is a ship. A fighter contains additional private members: num lasers, has hyperdrive and laser_color. num lasers is an unsigned int, has hyperdrive is a bool and laser_color is of type color which you must define via an enumerated type Make this enumerated type a public member of the class. The valid colors are red" "green" and "blue." o Add public getters and setters for each private member variable Add a print method that prints the details of the fighter. This should override the ship class print method. Output should follow my example output on Canvas Add a default constructor that sets num lasers to 0, has hyperdrive to false, and laser color to red. Add a parameterized constructor that sets num lasers, has hyperdrive and laser_color (in that order)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!