Question: In C++ take the Asteroid program Add a constructor below and split it into 3 files -- Asteroid.cpp, Asteroid.h and main.cpp In addition -- write
In C++ take the Asteroid program Add a constructor below and split it into 3 files -- Asteroid.cpp, Asteroid.h and main.cpp
In addition -- write the UML class diagram for this class.
#include
void setSpeed(int s){ speed = s; } };
int main() {
Asteroid a1;
a1.setSpeed(45); a1.setSize(34);
Asteroid a2;
a2.setSpeed(34); a2.setSize(5); return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
