Форум программистов, компьютерный форум, киберфорум
С++ для начинающих
Войти
Регистрация
Восстановить пароль
Карта форума Темы раздела Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.63/19: Рейтинг темы: голосов - 19, средняя оценка - 4.63
0 / 0 / 0
Регистрация: 07.01.2019
Сообщений: 76
1

Абстрактный класс,массив классов,наследование

21.02.2020, 19:03. Показов 3568. Ответов 3
Метки нет (Все метки)

Author24 — интернет-сервис помощи студентам
Доброго времени суток,нужна помощь в решении вот такой задачки:

1)Создать абстрактный класс Vehicle. На его основе реализовать классы Car (автомобиль), Bicycle (велосипед) и Lorry (грузовик). Классы должны иметь возможность задавать и получать параметры соответствующих транспортных средств (цена, максимальная скорость, год выпуска и т.д.). Наряду с общими полями и методами, каждый класс должен содержать и специфичные для него поля.
2)Создать класс Garage, содержащий массив или список объектов этих классов в динамической памяти. Предусмотреть возможность вывода характеристик объектов списка. Написать демонстрационную программу, в которой будут использоваться все методы классов.

Первый пункт ещё могу сделать сам,но вроде кривовато =),а вот второй пункт вообще не представляю как реализовывать.
Правильно ли я делал 1 пункт,нужно ли ещё что то писать в абстрактом классе и т.п возникают вопросы...
Пожалуйста выручайте,какие внести нужно правки и как сделать 2 пунктик,можно составить и многофайловую систему.

На данный момент написал вот такой код:
C++
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
#include <conio.h>
#include <iostream>
 
using namespace std;
 
//Абстракный класс
class Vehicle
{
    public:
        virtual void parameters() = 0;
        virtual void Show() = 0;
};
 
 
class Car :public Vehicle
{
    private:
      char price[30],maxspeed[30],release[30],icar[30];
 
    public:
 
        void parameters() override
        {
            cout<<"Mechanics or automatic:";
            cin>>icar;
            cout<<"Price:";
            cin>>price;
            cout<<"Maxspeed:";
            cin>>maxspeed;
            cout<<"Release:";
            cin>>release;
        }
        void Show() {
 
          cout<<"Mechanics or automatic:"<<icar<<endl;
          cout<<"Price::"<<price<<endl;
          cout<<"Maxspeed:"<<maxspeed<<endl;
          cout<<"Release:"<<release<<endl;
        }
};
 
class Bicycle :public Vehicle
{
    private:
      char price[30],maxspeed[30],release[30],ibicycle[30];
    public:
 
        void parameters() override
        {
            cout<<"How many speeds:";
            cin>>ibicycle;
            cout<<"Price:";
            cin>>price;
            cout<<"Maxspeed:";
            cin>>maxspeed;
            cout<<"Release:";
            cin>>release;
        }
        void Show() {
 
          cout<<"How many speeds:"<<ibicycle<<endl;
          cout<<"Price::"<<price<<endl;
          cout<<"Maxspeed:"<<maxspeed<<endl;
          cout<<"Release:"<<release<<endl;
        }
};
 
class Lorry :public Vehicle
{
    private:
      char price[30],maxspeed[30],release[30],ilorry[30];
    public:
 
 
        void parameters() override
        {
            cout<<"Awning Height:";
            cin>>ilorry;
            cout<<"Price:";
            cin>>price;
            cout<<"Maxspeed:";
            cin>>maxspeed;
            cout<<"Release:";
            cin>>release;
        }
        void Show() {
 
          cout<<"Awning Height:"<<ilorry<<endl;
          cout<<"Price::"<<price<<endl;
          cout<<"Maxspeed:"<<maxspeed<<endl;
          cout<<"Release:"<<release<<endl;
        }
};
 
 
class Garage
{
  public:
 
 
};
 
 
//Счётчики
int Vehicle = 0;
int VehicleCar = 0;
int VehicleBicycle = 0;
int VehicleLorry = 0;
 
int main()
{
    Car car[10];
    Bicycle bicycle[10];
    Lorry lorry[10];
 
    int choose = 0;
    while (1)
    {
        cout << "Enter action number" << endl
            << "1)Buy transport and drive into the garage" << endl
            << "2)Open garage" << endl
            << "3)Exit" << endl;
        cin >> choose;
        switch (choose)
        {
        case 1:
        {
            Vehicle++;
            system("cls");
            int k = 0;
        cout << "To get" << '\n';
            cout << "1)Car" << endl
                << "2)Bicycle" << endl
                << "3)Lorry" << endl;
            cin >> k;
            switch (k)
            {
            case 1:
            {
                VehicleCar++;
          system("cls");
                cout << "Enter in what parameters you want to buy a car!" << endl;
          cout << "--------------------------------------------------------------" << endl;
                car[VehicleCar].parameters();
          cout << "--------------------------------------------------------------" << endl;
          cout << "Thank you for your purchase, your car is driven into a garage!" << endl;
          _getch();
            }
            break;
            case 2:
            {
                VehicleBicycle++;
          system("cls");
                cout << "Enter on what parameters you want to buy a bike!" << endl;
          cout << "--------------------------------------------------------------" << endl;
                bicycle[VehicleBicycle].parameters();
          cout << "--------------------------------------------------------------" << endl;
          cout << "Thank you for your purchase, your bike is driven into the garage!" << endl;
          _getch();
            }
            break;
            case 3:
            {
                VehicleLorry++;
          system("cls");
                cout << "Enter on what parameters do you want to buy a truck!" << endl;
          cout << "--------------------------------------------------------------" << endl;
                lorry[VehicleLorry].parameters();
          cout << "--------------------------------------------------------------" << endl;
          cout << "Thank you for your purchase, your truck is driven into a garage!" << endl;
          _getch();
            }
            break;
            default:
            {
                cout << "Wrong choice!";
                _getch();
            }
            }
 
        }
        break;
        case 2:
        {
            if (Vehicle == 0)
            {
                cout << "The garage is empty!\n";
                _getch();
            }
            else
            {
 
 
                int n = 0, k = 0;
                system("cls");
          cout<<"Number of vehicles:"<<Vehicle<<endl;
                cout << "1)In the car garage (" << VehicleCar << ")" << endl
                    << "2)In the bike garage (" << VehicleBicycle << ")" << endl
                    << "3)In the truck garage (" << VehicleLorry << ")" << endl
                    << "Select the type of transport and its number to find out information!" << endl;
                cin >> n >> k;
 
                switch (n)
                {
                case 1:
                {
            if ((VehicleCar == 0) || (k>VehicleCar))
                {
              system("cls");
                    cout << "No cars!\n";
                    _getch();
                }
            else
            {
            system("cls");
                    car[k].Show();
                    _getch();
            }
                }
                break;
                case 2:
                {
            if ((VehicleBicycle == 0) || (k>VehicleBicycle))
                {
              system("cls");
                    cout << "No Bicycle!\n";
                    _getch();
                }
            else
            {
            system("cls");
                    bicycle[k].Show();
                    _getch();
            }
                }
                break;
                case 3:
                {
            if ((VehicleLorry == 0) || (k>VehicleLorry))
                {
              system("cls");
                    cout << "No Lorry!\n";
                    _getch();
                }
            else
            {
            system("cls");
                    lorry[k].Show();
                    _getch();
            }
                }
                break;
          }
            }
 
        }
        break;
        case 3:
        {
            system("cls");
            return 0;
        }
        break;
        default:
        {
            cout << "Wrong choice!";
            _getch();
        }
        break;
        }
        system("cls");
    }
    return 0;
 
}
0
Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
21.02.2020, 19:03
Ответы с готовыми решениями:

Абстрактный базовый класс и множественное наследование (либо иерархия классов)
Помогите пожалуйста с задачей. Кое-что написал но еще далеко не все. Все ли пока правильно? ...

Абстрактный класс, массив указателей на объекты производных классов
У меня есть абстрактный класс: class abstract{ public: int field; double method(); }; В...

Абстрактный класс, наследование, класс хранится в другом классе
Нужна помощь. Написать программу: 1 класс. Имеется абстрактный класс который описывает какую-то...

Наследование и абстрактный класс
Вот сделал список с такими условиями #include &lt;iostream&gt; #include &lt;conio.h&gt; #include &lt;string&gt;...

3
7 / 4 / 3
Регистрация: 10.12.2019
Сообщений: 10
21.02.2020, 23:48 2
Лучший ответ Сообщение было отмечено Cyber_Dezz как решение

Решение

Как вариант. Править можно много чего. Не знаю почему все переменные класса типа char.

C++
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#include <conio.h>
#include <iostream>
#include <vector> 
 
using namespace std;
 
//Абстракный класс
class Vehicle
{
    protected:
        char price[30]{}, maxspeed[30]{}, release[30]{};
    public:
        virtual void parameters() = 0;
        virtual void Show() = 0;
};
 
 
class Car :public Vehicle
{
    private:
        char icar[30]{};
 
    public:
 
        void parameters() override
        {
            cout<<"Mechanics or automatic:";
            cin>>icar;
            cout<<"Price:";
            cin>>price;
            cout<<"Maxspeed:";
            cin>>maxspeed;
            cout<<"Release:";
            cin>>release;
        }
        void Show() {
 
          cout<<"Mechanics or automatic:"<<icar<<endl;
          cout<<"Price::"<<price<<endl;
          cout<<"Maxspeed:"<<maxspeed<<endl;
          cout<<"Release:"<<release<<endl;
        }
};
 
class Bicycle :public Vehicle
{
    private:
        char ibicycle[30]{};
    public:
 
        void parameters() override
        {
            cout<<"How many speeds:";
            cin>>ibicycle;
            cout<<"Price:";
            cin>>price;
            cout<<"Maxspeed:";
            cin>>maxspeed;
            cout<<"Release:";
            cin>>release;
        }
        void Show() {
 
          cout<<"How many speeds:"<<ibicycle<<endl;
          cout<<"Price::"<<price<<endl;
          cout<<"Maxspeed:"<<maxspeed<<endl;
          cout<<"Release:"<<release<<endl;
        }
};
 
class Lorry :public Vehicle
{
    private:
        char ilorry[30]{};
    public:
 
 
        void parameters() override
        {
            cout<<"Awning Height:";
            cin>>ilorry;
            cout<<"Price:";
            cin>>price;
            cout<<"Maxspeed:";
            cin>>maxspeed;
            cout<<"Release:";
            cin>>release;
        }
        void Show() {
 
          cout<<"Awning Height:"<<ilorry<<endl;
          cout<<"Price::"<<price<<endl;
          cout<<"Maxspeed:"<<maxspeed<<endl;
          cout<<"Release:"<<release<<endl;
        }
};
 
 
class Garage
{
public:
    vector<Vehicle*> garage;
 
};
 
 
 
int main()
{
    Garage g;
    int choose = 0;
    while (1)
    {
        cout << "Enter action number" << endl
            << "1)Buy transport and drive into the garage" << endl
            << "2)Open garage" << endl
            << "3)Exit" << endl;
        cin >> choose;
        switch (choose)
        {
        case 1:
        {
            system("cls");
            int k = 0;
        cout << "To get" << '\n';
            cout << "1)Car" << endl
                << "2)Bicycle" << endl
                << "3)Lorry" << endl;
            cin >> k;
            switch (k)
            {
            case 1:
            {
                Car* car = new Car();
          system("cls");
                cout << "Enter in what parameters you want to buy a car!" << endl;
          cout << "--------------------------------------------------------------" << endl;
                (*car).parameters();
                g.garage.push_back(car);
          cout << "--------------------------------------------------------------" << endl;
          cout << "Thank you for your purchase, your car is driven into a garage!" << endl;
          _getch();
            }
            break;
            case 2:
            {
                Bicycle* bicycle = new Bicycle();
          system("cls");
                cout << "Enter on what parameters you want to buy a bike!" << endl;
          cout << "--------------------------------------------------------------" << endl;
                (*bicycle).parameters();
                g.garage.push_back(bicycle);
          cout << "--------------------------------------------------------------" << endl;
          cout << "Thank you for your purchase, your bike is driven into the garage!" << endl;
          _getch();
            }
            break;
            case 3:
            {
                Lorry* lorry = new Lorry();
          system("cls");
                cout << "Enter on what parameters do you want to buy a truck!" << endl;
          cout << "--------------------------------------------------------------" << endl;
                (*lorry).parameters();
                g.garage.push_back(lorry);
          cout << "--------------------------------------------------------------" << endl;
          cout << "Thank you for your purchase, your truck is driven into a garage!" << endl;
          _getch();
            }
            break;
            default:
            {
                cout << "Wrong choice!";
                _getch();
            }
            }
 
        }
        break;
        case 2:
        {
            if (static_cast<int>(g.garage.size())==0)
            {
                cout << "The garage is empty!\n";
                _getch();
            }
            else
            {
                for (const auto& element: g.garage)
                {
                    element->Show();
                    cout << '\n';
                }
                _getch();
            }
 
        }
        break;
        case 3:
        {
            system("cls");
            return 0;
        }
        break;
        default:
        {
            cout << "Wrong choice!";
            _getch();
        }
        break;
        }
        system("cls");
    }
    return 0;
 
}
1
103 / 82 / 78
Регистрация: 11.05.2015
Сообщений: 201
22.02.2020, 00:24 3
Лучший ответ Сообщение было отмечено Cyber_Dezz как решение

Решение

Такие параметры как цена, максимальная скорость и год выпуска являются общими для всех транспортных средств, поэтому их лучше вынести в класс Vehicle, соответственно классы Car, Bicycle и Lorry должны иметь поля уникальные для них.
В примере ниже класс Garage содержит два метода: park выполняет добавление транспортного средства в гараж, а showVehicles выводит все транспортные средства в гараже. В зависимости от типа объекта, хранимого в контейнере vehicles, при вызове метода show (через указатель типа Vehicle *) будет происходить вызов метода show для соответствующего типа (Car, Bicycle или Lorry), что достигается за счет полиморфизма.

C++
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
50
51
52
53
54
55
#include <iostream>
#include <vector>
 
using namespace std;
 
class Vehicle
{
public:
    virtual void show() = 0;
};
 
 
class Car :public Vehicle
{
public:
    void show() override { cout << "Car" << endl; }
};
 
class Bicycle :public Vehicle
{
public:
    void show() override { cout << "Bicycle" << endl; }
};
 
class Lorry :public Vehicle
{
    void show() override { cout << "Lorry" << endl; }
};
 
class Garage
{
public:
    void park(Vehicle * vehicle)
    {
        vehicles.push_back(vehicle);
    }
 
    void showVehicles()
    {
        for (Vehicle * v : vehicles)
            v->show();
    }
 
    vector<Vehicle *> vehicles;
};
 
int main()
{
    Garage garage;
    garage.park(new Car());
    garage.park(new Bicycle());
    garage.park(new Lorry());
    garage.showVehicles();
    return 0;
}
2
0 / 0 / 0
Регистрация: 07.01.2019
Сообщений: 76
22.02.2020, 15:11  [ТС] 4
Цитата Сообщение от ivan37 Посмотреть сообщение
.
,
Цитата Сообщение от PionerBro Посмотреть сообщение
.
Большое спасибо за помощь,вот в итоге что получилось:
C++
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
#include <conio.h>
#include <iostream>
#include <vector>
 
using namespace std;
 
class Vehicle
{
protected:
    char price[30]{}, maxspeed[30]{}, release[30]{};
public:
    virtual void parameters() = 0;
    virtual void show() = 0;
};
 
 
class Car :public Vehicle
{
private:
    char icar[30]{};
public:
    void parameters() override
    {
        cout<<"Mechanics or automatic:";
        cin>>icar;
        cout<<"Price:";
        cin>>price;
        cout<<"Maxspeed:";
        cin>>maxspeed;
        cout<<"Release:";
        cin>>release;
    }
    void show() override {
      cout <<"\n\n--------------------------------------"<<endl;
      cout<<"| C |Mechanics or automatic:"<<icar<<"  |"<<endl;
      cout<<"| A |Price::"<<price<<"\t\t     |"<<endl;
      cout<<"| R |Maxspeed:"<<maxspeed<<"\t\t     |"<<endl;
      cout<<"| S |Release:"<<release<<"\t\t     |"<<endl;
      cout <<"--------------------------------------"<<endl;
   }
};
 
class Bicycle :public Vehicle
{
private:
    char ibicycle[30]{};
public:
    void parameters() override
    {
        cout<<"How many speeds:";
        cin>>ibicycle;
        cout<<"Price:";
        cin>>price;
        cout<<"Maxspeed:";
        cin>>maxspeed;
        cout<<"Release:";
        cin>>release;
    }
    void show() override {
      cout <<"\n\n--------------------------------------"<<endl;
      cout<<"| B |How many speeds:"<<ibicycle<<"     |"<<endl;
      cout<<"| I |Price:"<<price<<"\t\t\t     |"<<endl;
      cout<<"| K |Maxspeed:"<<maxspeed<<"\t\t     |"<<endl;
      cout<<"| E |Release:"<<release<<"\t\t     |"<<endl;
      cout <<"--------------------------------------"<<endl;
   }
};
 
class Lorry :public Vehicle
{
private:
    char ilorry[30]{};
public:
      void parameters() override
      {
          cout<<"Awning Height:";
          cin>>ilorry;
          cout<<"Price:";
          cin>>price;
          cout<<"Maxspeed:";
          cin>>maxspeed;
          cout<<"Release:";
          cin>>release;
      }
      void show() override {
      cout <<"\n\n--------------------------------------"<<endl;
      cout<<"| L |Awning Height:"<<ilorry<<"\t     |"<<endl;
      cout<<"| O |Price::"<<price<<"\t\t     |"<<endl;
      cout<<"| R |Maxspeed:"<<maxspeed<<"\t\t     |"<<endl;
      cout<<"| Y |Release:"<<release<<"\t\t     |"<<endl;
      cout <<"--------------------------------------"<<endl;
   }
};
 
class Garage
{
public:
    void park(Vehicle * vehicle)
    {
        vehicles.push_back(vehicle);
    }
 
    void showVehicles()
    {
        for (Vehicle * v : vehicles)
            v->show();
    }
 
    vector<Vehicle *> vehicles;
};
 
int main()
{
    Garage garage;
    //garage.park(new Car());
    //garage.park(new Bicycle());
    //garage.park(new Lorry());
    //garage.showVehicles();
 
 
    int choose = 0;
    while (1)
    {
          cout << "Enter action number" << endl
              << "1)Buy transport and drive into the garage" << endl
              << "2)Open garage" << endl
              << "3)Exit" << endl;
          cin >> choose;
          switch (choose)
          {
            case 1:
            {
              system("cls");
              int k = 0;
              cout << "To get" << '\n';
              cout << "1)Car" << endl
                  << "2)Bicycle" << endl
                  << "3)Lorry" << endl;
              cin >> k;
              switch (k)
              {
                case 1:
                {
                //garage.park(new Car());
                  Car* car = new Car();
                  system("cls");
                  cout << "Enter in what parameters you want to buy a car!" << endl;
                  cout << "--------------------------------------------------------------" << endl;
                  (*car).parameters();
                  garage.park(car);
                  cout << "--------------------------------------------------------------" << endl;
                  cout << "Thank you for your purchase, your car is driven into a garage!" << endl;
                  _getch();
                }
                break;
                case 2:
                {
                  Bicycle* bicycle = new Bicycle();
                  system("cls");
                  cout << "Enter on what parameters you want to buy a bike!" << endl;
                  cout << "--------------------------------------------------------------" << endl;
                  (*bicycle).parameters();
                  garage.park(bicycle);
                  cout << "--------------------------------------------------------------" << endl;
                  cout << "Thank you for your purchase, your bike is driven into the garage!" << endl;
                  _getch();
                }
                break;
                case 3:
                {
                  Lorry* lorry = new Lorry();
                  system("cls");
                  cout << "Enter on what parameters do you want to buy a truck!" << endl;
                  cout << "--------------------------------------------------------------" << endl;
                  (*lorry).parameters();
                  garage.park(lorry);
                  cout << "--------------------------------------------------------------" << endl;
                  cout << "Thank you for your purchase, your truck is driven into a garage!" << endl;
                  _getch();
                }
                break;
                default:
                {
                    cout << "Wrong choice!";
                    _getch();
                }
              }
            }
            break;
 
            case 2:
            {
              if (static_cast<int>(garage.vehicles.size())==0)
              {
                  cout << "The garage is empty!\n";
                  _getch();
              }
              else{
                system("cls");
                cout << "\n----------------GARAGE----------------" << endl;
                garage.showVehicles();
                _getch();
              }
 
            }
            break;
 
            case 3:
            {
              system("cls");
              return 0;
            }
            break;
            default:
            {
                cout << "Wrong choice!";
                _getch();
            }
            break;
            }
            system("cls");
 
    }
    return 0;
 
 
 
}
Подскажите если надо ещё лучше что-то поправить.
0
22.02.2020, 15:11
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
22.02.2020, 15:11
Помогаю со студенческими работами здесь

Абстрактный класс. Наследование
class polygon{ int height, width, point p; e_color color; public: ...

Абстрактный базовый класс и множественное наследование
Общая постановка. Создать программу с абстрактным базовым классом и множественным наследованием....

Абстрактный базовый класс и множественное наследование
Общая постановка. Создать программу с абстрактным базовым классом и множественным наследованием,...

Абстрактный класс, одиночное наследование, далее множественное
Добрый вечер! никак не могу найти информацию о том, как правильно реализуется следующее действие:...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
4
Ответ Создать тему
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2024, CyberForum.ru