Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include "iostream.h"
- int main()
- {
- Samochod* s1 = new Samochod(9, false);
- Samochod* s2 = new Samochod(10, true);
- Mechanik* m = new Mechanic();
- Kierowca* k = new Kierowca();
- cout << "s1 poziom paliwa " << s1->dajPoziomPaliwa() << "stanTechniczny: " << s1->dajStanTechniczny() << endl;
- if (k->czyMogeJechac(s1) == false) {
- cout << "s1 wyslany do naprawy " << endl;
- m->naprw(s1);
- cout << "s1 po naprawie poziom paliwa : " << s1->dajPoziomPaliwa() << "stan techniczny " << s1->dajStanTechniczny << endl;
- }
- else{
- cout << "s1 sprawny , moge jechac" << endl;
- }
- cout << "s2 poziom paliwa " << s2->dajPoziomPaliwa() << "stanTechniczny: " << s2->dajStanTechniczny() << endl;
- if (k->czyMogeJechac(s2) == false) {
- cout << "s2 wyslany do naprawy " << endl;
- m->naprw(s2);
- cout << "s2 po naprawie poziom paliwa : " << s2->dajPoziomPaliwa() << "stan techniczny " << s2->dajStanTechniczny << endl;
- }
- else {
- cout << "s2 sprawny , moge jechac" << endl;
- }
- delete s1, s2, m, k;
- int a;
- cin >> a;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement