Skip to content

Instantly share code, notes, and snippets.

@attashe
Created December 20, 2016 12:58
Show Gist options
  • Save attashe/77851dd45e8ef5520dfc33f2aa776261 to your computer and use it in GitHub Desktop.
Save attashe/77851dd45e8ef5520dfc33f2aa776261 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <string>
#include <exception>
#include <clocale>
#include <typeinfo>
using namespace std;
class Transport {
double mass;
string title;
};
class Ship: Transport {
//водоизмещение
double displacement;
};
class CargoTransp : Transport {
double cargoWeight;
};
class PassTransp : Transport {
int passCount;
//посадка пассажиров
bool embark(int);
//высадка
void disembark();
};
class Sail : Ship {
//площадь парусов
double SailSquare;
void sailUp();
void saillDown();
};
class Steam : Ship {
//вместимость угля
double coalCap;
//текущее количество угля
double coal;
void startEngine();
void stopEngine();
};
int main() {
setlocale(0, "Rus");
cin.get();
// в конце для l удаляется автоматически
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment