Skip to content

Commit c9ed377

Browse files
authored
main.cpp
1 parent 91bb454 commit c9ed377

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include <iostream>
2+
#include "pojazd.h"
3+
4+
using namespace std;
5+
6+
int main() {
7+
Pojazd Autobus, Motor, Auto, Statek;
8+
9+
Autobus.setWheelNumber(6);
10+
Motor.setWheelNumber(2);
11+
Auto.setWheelNumber(4);
12+
13+
cout << Autobus.GetWheelNumber() << endl;
14+
cout << Motor.GetWheelNumber() << endl;
15+
cout << Auto.GetWheelNumber() << endl;
16+
17+
// sprawdzenie czy nowy obiekt dostaje liczbe kol (0) z konstruktora
18+
cout << Statek.GetWheelNumber() << endl;
19+
return 0;
20+
}

0 commit comments

Comments
 (0)