dimanche 21 février 2021

design patterns for travel system

I have a small python project to work with 3 design patterns.

my idea is a travel book system (flight, train, bus) -> hier I tried to use the stratgy pattern to choise which way of travel (I'm not sure if that's right)

  • the user can book a place depens on the travel-type
  • the status of the trip can be changed from (availble - lated - canceled ) I tried to use State pattern

can you please help by implemnt an python example and correct me if i choised wrong design patterns.

thanks

Aucun commentaire:

Enregistrer un commentaire