Programowanie C++
Dany jest obiekt rzeczywisty Warsztat_samochodowy
utworzyć klasę która Warsztat_samochodowy która ma 8 pól i 4 metody 16x get i set konstruktor 8 parametrowy, destruktor program po uruchomieniu ma wyświetlać menu programu (4 opcje)
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2025 KUDO.TIPS - All rights reserved.
Z racji tego, że nie napisałeś niczego na temat tego zadania (nic na temat pól klasy, nic na temat funkcji w sumie nic) dostaniesz dokładnie to co jest wyszczególnione w treści zadania.
class WarsztatSamochodowy {
int p1;
int p2;
int p3;
int p4;
int p5;
int p6;
int p7;
int p8;
WarsztatSamochodowy(int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8){
this.p1=p1;
this.p2=p2;
this.p3=p3;
this.p4=p4;
this.p5=p5;
this.p6=p6;
this.p7=p7;
this.p8=p8;
}
~WarsztatSamochodowy(){}
int getP1() {
return p1;
}
void setP1(int p1) {
this.p1 = p1;
}
int getP2() {
return p2;
}
void setP2(int p2) {
this.p2 = p2;
}
int getP3() {
return p3;
}
void setP3(int p3) {
this.p3 = p3;
}
int getP4() {
return p4;
}
void setP4(int p4) {
this.p4 = p4;
}
int getP5() {
return p5;
}
void setP5(int p5) {
this.p5 = p5;
}
int getP6() {
return p6;
}
void setP6(int p6) {
this.p6 = p6;
}
int getP7() {
return p7;
}
void setP7(int p7) {
this.p7 = p7;
}
int getP8() {
return p8;
}
void setP8(int p8) {
this.p8 = p8;
}
void f1(){};
void f2(){};
void f3(){};
void f4(){};
}
i w mainie
int wybor;
cout << "Opcja1\nOpcja2\nOpcja3\nOpcja4;
cin>> wybor;