-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuebung4.cpp
More file actions
49 lines (36 loc) · 773 Bytes
/
Copy pathuebung4.cpp
File metadata and controls
49 lines (36 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <iostream>
#include <string>
class Car {
private:
int geschwindigkeit;
int kw;
std::string farbe;
std::string marke;
std::string modell;
public:
Car (int a, int b, std::string c, std::string d, std::string e) : geschwindigkeit(a), kw(b),farbe(c),marke(d),modell(e){}
int zeigeGeschwindigkeit (int a) {
return geschwindigkeit;
}
int zeigeKW () {
return kw;
}
std::string zeigeFarbe(){
return farbe;
}
std::string zeigeMarke(){
return farbe;
}
std::string zeigeModell(){
return farbe;
}
};
int main(){
int a = 175;
int b = 65;
std::string c= "blau";
std::string d= "Opel";
std::string e= "Vectra";
Car A(a,b,c,d,e);
std::cout << A.zeigeMarke() << A.zeigeModell() << A.zeigeFarbe() ;
}