Skip to content
Permalink
Browse files
weapon
  • Loading branch information
alimoha2 committed Mar 20, 2020
1 parent 62a1f00 commit af69d057cbecb15a6db9c27fe2fd7713293cc143
Showing 1 changed file with 87 additions and 0 deletions.
@@ -0,0 +1,87 @@
#include <string>
#include <iostream>
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 <iostream>
using namespace std;

int main()
{
weapons swordObj(100, 50, "katana");
cout << swordObj.getDamage() << endl;
cout << swordObj.getDurability()<<endl;
cout << swordObj.getName()<<endl;
}

0 comments on commit af69d05

Please sign in to comment.