Essays.club - Получите бесплатные рефераты, курсовые работы и научные статьи
Поиск

Контрольная работа по "Программированию"

Автор:   •  Декабрь 21, 2021  •  Практическая работа  •  507 Слов (3 Страниц)  •  142 Просмотры

Страница 1 из 3

#define _CRT_SECURE_NO_WARNINGS 1

# include <iostream>

# include <vector>

# include<cstring>

# include <locale.h>

using namespace std;

class CVehicle

{

private: int x, y, year;

float price, speed;

public:

CVehicle(int x, int y, int year, float price, float speed)

{ //constructor CVehicle

this->x = x; this->y = y;

this->year = year;

this->price = price;

this->speed = speed;

}

void get_parametr()

{

setlocale(LC_ALL, "Rus");

cout << "Введите координаты: ";

cin >> x >> y;

cout << "Координаты:" << this->x << " " << this->y << endl;

cout << "Год" << this->year << endl;

cout << "Цена" << this->price << endl;

cout << "Скорость" << this->speed << endl;

}

};

class CPlane : public CVehicle {

private: unsigned high; unsigned number_of_pasangers;

public:

CPlane(int x, //constructor CPlane

int y,

int year,

float price,

float speed,

unsigned high,

unsigned number_of_pasangers

) :CVehicle(x, y, year, price, speed)

{

this->high = high;

this->number_of_pasangers =

...

Скачать:   txt (2.4 Kb)   pdf (45.7 Kb)   docx (8.6 Kb)  
Продолжить читать еще 2 страниц(ы) »
Доступно только на Essays.club