Created
December 20, 2016 12:58
-
-
Save attashe/77851dd45e8ef5520dfc33f2aa776261 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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