Superclass gun
I am trying to make a comparison of guns ona video game. I cant figure out how to make the gun class a super class and the actual guns inherit those traits.
6 Replies
There's nothing special to a class to make it a "super" class
Any class can inherit any class
Unless the base class is
sealed
well then im trying to make a base class gun, which spefic guns will inherit from like rate of fire, damage etc.
Go ahead
Just make a
Gun
class
And have your Ak47
inherit itI am trying but this is my first time really coding anything. im not sure how i would make the base class. I just know i need cost, capacity, damage, effective range and rate of fire
$helloworld