lundi 12 novembre 2018

Java Design pattern - drivers and cars

I hava a java Project about making an Uber app. In the project, there is Driver , Customer and Cars. A car can be owned by several driver but not at the same time. I didn't find how to make sure that two driver are not taking the same car at the same moment. I should find a solution using the design patterns ( Singleton, observer, ..). Do you have any ideas ?

Aucun commentaire:

Enregistrer un commentaire