Advertisement
ejdier

zadanie 27.03.2014 a)

Mar 27th, 2014
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. class SprzetRTV
  6. { protected:
  7.     string nazwaU;
  8.     bool stan;
  9.     public:
  10.     SprzetRTV(string n)
  11. {
  12.  nazwaU=n;
  13. };
  14.  
  15.   bool wlacz(){stan="TRUE";};
  16.   bool wylacz(){stan="FALSE";};
  17.  
  18.  string nazwa()
  19. {  
  20.     return nazwaU;
  21. }
  22. };
  23.   class Radio : public SprzetRTV
  24. {  public:
  25.    Radio (string na) : SprzetRTV(na)
  26. {
  27. }
  28.  
  29. string nazwa(){
  30.  return  "Radio"+ nazwaU;
  31. }
  32. };
  33.  int main()
  34. {
  35.  Radio r("Sony");
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement