Question: Define an abstract class named Weapons o Variables Damage Durability o Functions Overloaded Constructor getDamage getDurability CalcDamage- pure virtual function Define a class named Range

 Define an abstract class named Weapons o Variables Damage Durability o
Functions Overloaded Constructor getDamage getDurability CalcDamage- pure virtual function Define a class

Define an abstract class named Weapons o Variables Damage Durability o Functions Overloaded Constructor getDamage getDurability CalcDamage- pure virtual function Define a class named Range that is derived from Weapons with the following members o Variables Range of weapon Projectile Damage o Functions Overloaded constructor Arguments: Range, projectile Damage Sets values for all member variables. Mutators Accessors CalcDamage - Adds Basic damage of weapon to projectile damage - Define a class named Melee that is derived from Weapons with the following members o Variables NumofHands o Functions Overloaded Constructor Arguments: Bonus Damage NumofHands (1 or 2). Mutators Accessors CalcDamage If Num of Hands is 2 multiply base damage by 2. If num of hands is 1 then return base damage of weapon

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!