czlowiekzgon

Untitled

Jan 7th, 2019
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. #pragma once
  2. #include "pch.h"
  3. #include <iostream>
  4. #include <string>
  5.  
  6.  
  7. using namespace std;
  8.  
  9. class Dealer {
  10. private:
  11. string nameDealer;
  12. string region;
  13.  
  14. class Drug {
  15. private:
  16. mutable string nameDrug;
  17. mutable int priceDrug;
  18. public:
  19. Drug();
  20. ~Drug();
  21. void initDrug(const string nameDr,const int priceDr);
  22. void show()const;
  23. string getDrugName()const;
  24. int getDrugPrice()const;
  25. void prohibition(string nameD, int priceD)const;
  26. Drug & operator=(const Drug & d);
  27. friend ostream & operator<<(ostream & os, const Drug d);
  28. };
  29.  
  30. Drug drug;
  31. public:
  32. Dealer();
  33. Dealer(const Dealer &d);
  34. ~Dealer();
  35. int getDrugPrice()const;
  36. void initDealerDrug(const string nameD,const int priceD);
  37. void initDealer(const string nameD,const string regionD,const string nameDr,const int priceDr);
  38. void prohibitionDrug(const string nameD,const int priceD)const;//funkcja wykorzystujaca muteable
  39. void show()const;
  40.  
  41. Dealer & operator=(const Dealer & d);
  42. };
Add Comment
Please, Sign In to add comment