Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. enum MATERIAL {wood, wool, kevlar, steal};
  2.  
  3. #include "stdafx.h"
  4. using namespace std;
  5.  
  6. class CHandWear
  7. {
  8. public:
  9.     bool SetColor(int newColor);
  10.     int GetColor();
  11.     bool SetPrice(double newPrice);
  12.     double GetPrice();
  13.     bool SetName(char* newName);
  14.     char*GetName();
  15.     bool SetMaterial(char* newMaterial);
  16.     char*GetMaterial();
  17.     CHandWear(int newColor, double newPrice, char* newMaterial, char* newName); //konst
  18.     ~CHandWear(); //dest
  19.  
  20. protected:
  21.     int color;
  22.     double price;
  23.     MATERIAL material; // przykładowe użycie: material = wood || material = wool || material = kevlar || material = steal
  24.     char name[30];
  25. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement