Skip to content

Conversation

@DmitriyRodin
Copy link
Collaborator

No description provided.

std::cout << color_ << " car has been created\n";
}
Car::~Car()
{ std::cout << color_ << " car has been destroied\n"; }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

мелочь. но старайся сразу писать код в одном стиле (см. размещение фигурных скобок здесь и выше)

Driver(const std::string& name, std::shared_ptr<CarFactory> factory);
void BuyCar(const std::string& color);
void BuyUsedCar(Driver* d);
std::unique_ptr<Car> CellCar();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SellCar

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

спасибо. исправил. хорошо что не видела моя учительница по английскому ;-)

@@ -0,0 +1,20 @@
#pragma once
#include "stdafx.h"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

этот здесь не нужен - перенеси в cpp

#include <iostream>
#include <string>
#include <memory>
#include "Driver.h"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

свои файлы лучше по месту подключать

@@ -0,0 +1,12 @@
#pragma once
#include "stdafx.h"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не нужен

@@ -0,0 +1,9 @@
#pragma once
#include "stdafx.h"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не нужен

Copy link
Collaborator Author

@DmitriyRodin DmitriyRodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0

Driver(const std::string& name, std::shared_ptr<CarFactory> factory);
void BuyCar(const std::string& color);
void BuyUsedCar(Driver* d);
std::unique_ptr<Car> CellCar();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

спасибо. исправил. хорошо что не видела моя учительница по английскому ;-)

//std::unique_ptr < Driver> currentDriver(new Driver("Ivan", factory_));
//DriversInAutoschool_.push_back(std::move(currentDriver));
//secondway: same but less code
DriversInAutoschool_.push_back(std::unique_ptr < Driver>(new Driver("Ivan", factory_)));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

странно, до разьединения на файлы классов работала вставка драйверов и менеджеров в класс, почему сейчас не работает?! это дело в том что я опять неверно подключил в файлах другие файлы?!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в autoschool.h не видны CarFactory, Driver и DriverManager

{
std::cout << "go! ";//it works!
//failed to implement through functor and this line stil doesn't work:
std::thread th_(&ThreaFunctionManager,OneDriver_);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в этой строке у меня ошибка. подскажи как решить - не собирается даже, чтобы отдебажить (((

реализация через перегрузку оператора крутые скобки тоже не далась мне...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

такой вариант тоже не собирается: std::thread th_(&DriverManager::ThreaFunctionManager,&OneDriver_);

DriverManagers_[i].GetOneDriver(std::move(std::unique_ptr<Driver>(DriversInAutoschool_[j].release())));
j++;
DriverManagers_[i].setFiledManagerToOnedDrivers(0);
DriverManagers_[i].GetOneDriver(std::move(std::unique_ptr<Driver>(DriversInAutoschool_[j].release())));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

этот участок точно не дебажил :(
после первого вызова release() в unique_ptr будет nullptr.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

будет и ок. дальше j++ и мы передаём драйверов дальше. именно этот участок дебажил вчера. вроде ничего не менял критично

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

если я не увидел проблемы - прошу укажи мне на неё. сейчас повторю дэбаг этого участка.

тут логика такая что раз я решил, что у менеджера только два водителя - упрощение на этапе создания программы - то вот такой механизм их записи сделал, когда счётчик идёт по номеру менеджера, а драйверов в два раза больше по числу.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

на j++
не обратил внимания.

if (!this->HaveCar())
{
std::vector<int > temp = this->canIbuyUsedCar();
int y = temp.empty();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

почему int ?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

и зачем это здесь вообще?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

надо было закоментировать мои строки "для отладки". сори. это только для отладки

bool probaPera = this->HaveCar();
if (!this->HaveCar())
{
std::vector<int > temp = this->canIbuyUsedCar();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

судя по имени функции canIBuyUsedCar() она должна возвращать true/false, но ни как ни вектор

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

да название отстало от реализации. надо переименовать во что-то типа canIBuyUsedCarIFCanGIVEManagerAndDriver()

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

достаточно буде canIBuyUsedCar

mtx.lock();
//std::lock_guard<std::mutex>lock(mtx);
this->Go();
bool probaPera = this->HaveCar();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

именование переменных забавное, но и тебя сбивает и в ревью не понятно

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это для дебага - понимать состояние - ещё раз прости. на будущее закоментирую вовсе или оставлю комментарий что это для дебага.

int i = 100;
while (i)
{
mtx.lock();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

зачем тут лочится мьютекс?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

для того, чтобы покупка и поиск для покупки usedCar прошёл без вмешаетльства других потоков

{
currentSchool; // ôóíêöèÿ äëÿ ïîèñêà äðàéâåðà ñ ìàøèíîé
return 1;
std::vector <int> temp = myManager_->isDriverToBuyCarFromAllManagers_m(mySchool_);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isDriverToBuyCarFromAllManagers_m - судя по названию должна true или false возвращать

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

возможна и такая логика, но у меня возвращает дополнительно 1 или 2 - и так сразу решает две задачи, чтобы меньше вызовов было, по сути одинаковых.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

можешь объяснить, что такое 1, что такое 2 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в векторе DriversOwnedByManagers_ у меня жётско зашито - только два драйвера.
1 - значит есть авто у DriversOwnedByManagers_[0] - то есть первого драйвера у этого мэнеджера
1 - значит есть авто у DriversOwnedByManagers_[2] - то есть второго драйвера у этого мэнеджера

если 0 - значит у этого мэнеджера нет драйверов с авто

{
std::vector<int > temp = this->canIbuyUsedCar();
int y = temp.empty();
if (temp.empty())//If temp.empty==1 than meens temp is empty
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty() возвращает true/false https://en.cppreference.com/w/cpp/container/vector/empty

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

знаю это и что?!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

выше приравниваешь к инту, здесь коммент
//If temp.empty==1

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

если ты к тому что так (temp.empty()==1) более понятно, то согласен. Буду применять. Если иначе - прошу дать комментарий

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я к тому, что "выше приравниваешь к инту, а здесь коммент //If temp.empty==1"
не нужно bool с интом стравнивать.
т.е. в условии if((temp.empty()) правильная запись

std::cout << std::endl << "Get Ready!" << std::endl;
//this->BuyUsedCar();
//line below doesn't work
//car_ = mySchool_->giveUsedCarFromDriversOwnedManagers(temp);//you should work with metods not fields
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а можешь тут рассказать какая была идея. что за temp? какая дальше логика в giveUsedCarFromDriversOwnedManagers?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в giveUsedCarFromDriversOwnedManagers() передаётся вектор.

Выше мы смотрим, если он пустой, то в else не заходим. Если не пстой - то в нём записано два числа - первое число это номер мэнеджера в векторе мэнедежров-мэмбер автошколы-DriverManagers_ и второе число - это номер драйвера в векторе DriversOwnedByManagers_ то есть это номер драйвера в векторе - которым владеет только один мэнеджер.

Возвращаемся к giveUsedCarFromDriversOwnedManagers(). Вызывает её водитель, обращаясь к автошколе - своему родителю, передавая ей в виде вектора CoordinatesOfDriverHasCar два числа: номер менеджера и номер драйвера у этого менеджера. Функция giveUsedCarFromDriversOwnedManagers() сама обращается к этому драйверу сразу в return DriverManagers_[CoordinatesOfDriverHasCar[0]] где просит его выполнить метод tellDriverTosellCar, передавая в него номер водителя- он записан во втором элементе вектора CoordinatesOfDriverHasCar[1]. По сути это запрос внутри мэмбера мэнеджера продать машину. При переходу к этому методу видим DriversOwnedByManagers_[index]->SellCar();
И именно вот этот сквозной возврат уникального указателя у меня "не срабатывает". Я понятно изложил заложенную механику?

PS При покупке бу авто я отошёл от логики использования функции BuyUsedCar, потому что драйвер

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вообще стало не на много понятнее :)
вектор возвращается из this->canIbuyUsedCar() ? что в ней происходит?

#include "Car.h"
#include "autoschool.h"

int DriverManager::NumberOfManagers = 0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ага, была попытка статический член использовать, но он не потребовался. С этого улыбаешься или что-то ещё?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

статические переменные это уже как мемчик )

//OneDriver_->Go();
}
void DriverManager::ThreaFunctionManager()
void DriverManager::ThreaFunctionManager()//previous version
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

у тебя же есть отличный инструмент контроля версий.
подобные комментарии //previous version - тебя же самого запутывают

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

да, это так. просто сюда я заливаю готовые решение, а где хранить промежуточные - в ходе создания программы и отладки. чтобы быстро "откатиться" назад, оставляю код и комментрию его. Подскажи как делать иначе?! пушить в "свой" репозхиторий?! а потом научиться "из него откатываться" до "предыдущей стабильной версии"?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

сюда нужно заливать все промежуточные. почему нет?

std::vector <int> DriverManager::isDriverToBuyCarFromAllManagers_m(autoschool* currentSchool)
{
std::vector <int> temp = currentSchool->isDriverToBuy_as();
bool r=temp.empty();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

о, тут bool)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

выше уже отписался. вектор тут возвращается. буду иначе именовать функции или разделять на две - одна будет возвращать bool а вторая отрабаывать и возвращать номер,если true

}
std::vector <int> DriverManager::isDriverToBuyCarFromAllManagers_m(autoschool* currentSchool)
{
std::vector <int> temp = currentSchool->isDriverToBuy_as();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

что означают суффиксы _m _as в именовании функций?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m - функция мэнеджера, а as - функция автошколы

{
//OneDriver_->Go();
DriversOwnedByManagers_[0]->cleverGo();
DriversOwnedByManagers_[1]->cleverGo();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

почему-то стартует строка 31 в потоке, а строка 32 - нет ((( и того вместо того, чтобы обработать два объекта в одном потоке - и у обоих запустить cleverGo, я запускаю только одного - который вызван в строке 31.

Сам посмотрю ещё. Интересно твоё мнение профессионала - где здесь и что я упустил из виду. Пока не смог найти сам.


std::unique_ptr<Car> CarFactory::BuildCar(const std::string& color)
{
return std::unique_ptr<Car>(new Car(color));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

можно make_unique

std::mt19937 gen(rd());
std::uniform_int_distribution<> distrib(1, 2);
int random_number = distrib(gen);
std::lock_guard<std::mutex> locked(mtx);
Copy link
Owner

@Krestol Krestol Jun 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

все драйверы будут выполнять Drive() и операции с покупкой/продажей последовательно, что не ок
нужно сузить область синхронизации до минимально необходимой

}
}
}
void Driver::Go()//already dont use in prog
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

если не используется не нужно оставлять

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ок

int intRand(const int& min, const int& max);
private:
std::unique_ptr<Car> car_;
std::shared_ptr<CarFactory> factory_;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

почему factory в shared, а manager и school в обычном указателе?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

потому что они никуда и никому не передаются. в данном контексте, по аналогии с factory - можно было использовать shared_ptr для manager и school. Для практики

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а что если удалятся?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я тебя понял. тогда очевидно программа ляжет, так как случится UB. урок данного урока в том что если использовать указатели, то только умные в дальнейшем: shared или unique.

{

int i = 4;
while (i)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for в таком случае выглядит очевиднее

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

на будущее принято

std::vector<std::thread> threads;
for (unsigned currentDriverNumber = 0; currentDriverNumber < DriversOwnedByManagers_.size(); ++currentDriverNumber)
{
std::random_device rd;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

генерация случайного числа дублируется - можно в отдельную функцию вынести

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ты имеешь ввиду вынести в отдельную функцию вот эти три строки, под первой из которых ты и оставил этот комментарий?!
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution<> distrib(1, 2);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

понял. этот код в двух местах, но в этом он не нужен - перенёс его уже полностью в cleverGo();

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

точнее он там и был. оставил только там

{
throw std::runtime_error ("...tried to buy a used car but they aren’t\n");
}
Driver* p_DriverWithCar = PtrDriversWithCar_.back();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

что если в элементе контейнера окажется nullptr

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

плохо будет, но вроде как логикой программы это непредусмотренно. В какой ситуации это возможно?!

Как я понимаю ты предлагаешь тут поставить некую проверку, на всякий случай? Например на случай, если вдруг другой программист поменяет логику функции, которая записывает данные в данный вектор.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

да

}
Driver* DriverManager::GivePtrDriverWithCar()
{
if (PtrDriversWithCar_.empty())
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

обращение к контейнеру синхронизированно между потоками? не получится, что один записывает/удаляет, а другой вызывает empty() ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

сюда мы попадаем из функции cleverGo(). Она и так вся под mutex. При вызове внутри этой функции разве не будет этот mutex распространятся и на вызываемые функции?!

Copy link
Owner

@Krestol Krestol Jun 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

При вызове внутри этой функции разве не будет этот mutex распространятся и на вызываемые функции

будет

std::shared_ptr<CarFactory> factory_;
std::vector<std::unique_ptr<Driver>> DriversOwnedByManagers_;
static int NumberOfManagers;//TODO ïîäóìàòü ÷òî ñ ýòèì ðåøèòü
std::vector<Driver*> PtrDriversWithCar_;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не возникнет проблем с тем, что driver, который хранится в элементе контейнера будет удален, а в контейнере останется null ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

для этого вроде как pop_back() есть в функции GivePtrDriverWithCar() в предпоследней её строке. Если это не решает проблемы - прошу раскрой где она ещё кроется и натолкни/подскажи решение

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

см. комментарий выше

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да, это так. Ты прав такое возможно. Во избежание проблемы поставил std::lock_guardstd::mutex locked(mtx); в функцию, которая работает с std::vector<Driver*> PtrDriversWithCar_; (залил в крайний git push)
Как я вижу это решает проблему. Если нет - прошу указать.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вопрос: а можно здесь использовать вектор уникальных указателей?! mutex при этом в любом случае нужно ставить в функции, которые работают с этим вектором, но в целом это работу с вектором ещё больше обезопасит.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вектор умных указателей использовать можно

@@ -0,0 +1,15 @@
#pragma once
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pragma once в cpp не нужно

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ок

#include "CarFactory.h"
#include "autoschool.h"

std::mutex mtx;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

доступ к какому ресурсу синхронизирует этот мьютекс?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это уже разобрали в переписке в телеграмме. доступ к std::vector<Driver*> PtrDriversWithCar_ - это мембер класса DriverManager

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

меняю код

{
Driver* p_driverWithCar = myManager_->GivePtrDriverWithCar();
this->BuyUsedCar(p_driverWithCar);
//this->BuyUsedCar(myManager_->GivePtrDriverWithCar()); //same as the two lines above
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не оставляй ненужных комментариев

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ок. хотел у тебя спросить - строки 50 и 51 в сумме идентичны строке 52?!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

да, myManager_->GivePtrDriverWithCar() можно передать прямо в BuyUsedCar()

}
std::unique_ptr<Car> Driver::SellCar()
{
return std::unique_ptr<Car> (car_.release());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

машину продал, а у менеджера числится как тот, кто все еще может продать?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не числится, так как есть:
void Driver::BuyUsedCar(Driver* d)
{
car_ = d->SellCar();
std::cout << "I bought a used car\n";
myManager_->GetPtrDriverWithCar(this);
}

просто под покупку бу авто используют отдельную функцию BuyUsedCar. предполагаю что SellCar использовать будут только "свободные" от менеджера Driver'ы.

или есть в чём-то тут проблема?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не совсем очевидно, ну ладно

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

на будущее учту

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants