Question: Hello, could you please help me with a c + + code. Could you give me the breakdown of this code? Your Object class should

Hello, could you please help me with a c++ code. Could you give me the breakdown of this code?
Your Object class should exhibit the following features.
Object should maintain the following protected members:
const Type name{ Type::none };
Vector2D position{0,0};
const GUI& gui; //IMPORTANT!!!
Object should have the following public accessor methods (i.e., getters/setters):
getPosition();
setPosition();
getDimensions();
getName();
Object should have the following enums:
enum class Command { up, down, left, right, attack, jump, NA };
enum class Type { none, bridge_center, bridge_end, bridge_start, center_block, top_block, tree_background, water, water_shore, water_top, water_wall, water_wall_corner, player=100, enemy=200};
Object should overload the following constructors:
Object()= delete;
Object(Vector2D position, Type name, const GUI& gui);
Object should have the following purely abstract method
update()
The Object.h file also contains the definition of the Vector2D struct.
Your Block class should exhibit the following features.
Public child of the Object class
Block should maintain NO private members:
Block should overload the following constructors:
Block()= delete;
Block(Vector2D position, Object::Type name, const GUI& gui);
Block should override the following virtual method
update();
This is an empty method and only here to make the class instantiable!

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 Programming Questions!