Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Jan 15, 2022
1 parent 8a8505d commit ef7fa31
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Project6AbstractBaseClass/Project6AbstractBaseClass.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{fcef0c5f-2708-4dbf-bb9a-7c00cb865be4}</ProjectGuid>
<RootNamespace>Project6AbstractBaseClass</RootNamespace>
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
Expand Down
10 changes: 5 additions & 5 deletions Project6AbstractBaseClass/mainAbstractBaseClass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Bike :public GroundVehicle //Мотоциклы
//Конкретный класс, поскольку он определяет чисто виртуальный метод move
{
public:
void move()
void move()const
{
cout << "Мотоцикл ездит на двух колесах." << endl;
}
Expand All @@ -41,15 +41,15 @@ class Bike :public GroundVehicle //Мотоциклы
class Car :public GroundVehicle
{
public:
void move()
void move()const
{
cout << "Машина едет на 4 колесах" << endl;
}
};

class Boat :public WaterVehicle
{
void move() const
void move()const
{
cout << "Лодка плывет." << endl;
}
Expand All @@ -59,8 +59,8 @@ void main()
{
setlocale(LC_ALL, "");

Vehicle V; //Невозможно создать экземпляр абстрактного класса
GroundVehicle GV; //Этот класс так же является абстрактным, поскольку он не определяет метод move
//Vehicle V; //Невозможно создать экземпляр абстрактного класса
//GroundVehicle GV; //Этот класс так же является абстрактным, поскольку он не определяет метод move
Bike HD;
HD.move();
Car BMW;
Expand Down

0 comments on commit ef7fa31

Please sign in to comment.