diff --git a/weapons class b/weapons class new file mode 100644 index 0000000..f7cd59d --- /dev/null +++ b/weapons class @@ -0,0 +1,87 @@ +#include +#include +using namespace std; + + +class weapons +{ + private: + int damage,durability; + string background, name; + + + + public: + + weapons(int x, int y, string z) { + damage = x; + durability = y; + name = z; + + } + + void setDamage(int _damage) + { + damage = _damage; + } + + int getDamage() + { + return damage; + } + + + void setDurability(int _durability) + { + durability = _durability; + } + + int getDurability() + + { + return durability; + } + + + void setBackground(string _background) + { + + background = _background; + } + + string getBackground() + { + return background; + } + + string setname(string _name) + { + name = _name; + } + + + string getName() + { + return name; + } + + + + +}; + + + + + +#include "project.h" +#include +using namespace std; + +int main() +{ + weapons swordObj(100, 50, "katana"); + cout << swordObj.getDamage() << endl; + cout << swordObj.getDurability()<