Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. class Object {
  2. private:
  3. int id; string name;
  4. public:
  5. Object(){};
  6. Object(int i, string n){name = n; id = i;};
  7. };
  8.  
  9.  
  10. class Button: virtual public Object {
  11. private:
  12. string type1;
  13. int x_coord, y_coord;
  14. public:
  15. Button():Object(){};
  16. Button(int i, string n, string ty, int x, int y):Object(i, n){
  17. type = ty;
  18. x_coord = x;
  19. y_coord = y;};
  20. };
  21.  
  22.  
  23. class Action: virtual public Object {
  24. private:
  25. string type2;
  26. public:
  27. Action():Object(){};
  28. Action(int i, string n, string t):Object(i, n){ type2 = t;};
  29. };
  30.  
  31.  
  32. class ActionButton: public Button, public Action{
  33. private:
  34. bool active;
  35. public:
  36. ActionButton():Buton(), Action(){};
  37. ActionButton(int i, string n, string t1, int x, int y, string t2, bool a):
  38. Button(i, n, t1, x, y), Action(i, n, t2) {active = a;};
  39. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement