Advertisement
czlowiekzgon

dealer cpp

Nov 28th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1.  
  2. #include "pch.h"
  3. #include "Dealer.h"
  4. #include <iostream>
  5. #include <string>
  6. using namespace std;
  7.  
  8.  
  9. Dealer::Drug::Drug() {
  10.  
  11. }
  12.  
  13. Dealer::Drug::~Drug() {
  14.  
  15. }
  16.  
  17. void Dealer::Drug::initDrug() {
  18. cout << "Podaj nazwe towaru : ";
  19. cin >> this->nameDrug;
  20.  
  21. cout << "Podaj cene towaru : ";
  22. cin >> this->priceDrug;
  23. }
  24.  
  25. void Dealer::Drug::show() {
  26. cout << "Nazwa towaru : " << this->nameDrug << endl;
  27. cout << "Cena towaru : " << this->priceDrug << endl;
  28. }
  29.  
  30.  
  31. Dealer::Dealer(){
  32.  
  33. }
  34.  
  35.  
  36.  
  37. Dealer::~Dealer(){
  38.  
  39. }
  40.  
  41.  
  42. void Dealer::initDealer() {
  43. cout << "Podaj imie dealera : ";
  44. cin >> this->nameDealer;
  45. cout << "Podaj region pracy dealera : ";
  46. cin >> this->region;
  47. drug.initDrug();
  48. }
  49.  
  50. void Dealer::show() {
  51. cout << "Dane : " << endl;
  52. cout << "Nazwa dealera : " << this->nameDealer << endl;
  53. cout << "Region pracy dealera" << this->region << endl;
  54. drug.show();
  55.  
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement