Class CardFactory


  • public class CardFactory
    extends java.lang.Object
    The CardFactory class : This is the factory to create and add new cards to users It is uses the simple factory design pattern
    • Constructor Summary

      Constructors 
      Constructor Description
      CardFactory()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addVlibre​(MyVelibSystem system, User user)
      This method is responsible to add a new Vlibre card to a user
      static void addVmax​(MyVelibSystem system, User user)
      This method is responsible to add a new Vmax card to a user
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CardFactory

        public CardFactory()
    • Method Detail

      • addVmax

        public static void addVmax​(MyVelibSystem system,
                                   User user)
        This method is responsible to add a new Vmax card to a user
        Parameters:
        system - the system in which the user is supposed to be in
        user - the supposed user that we want to add a new Vmax card (he may not be on the system)
      • addVlibre

        public static void addVlibre​(MyVelibSystem system,
                                     User user)
        This method is responsible to add a new Vlibre card to a user
        Parameters:
        system - the system in which the user is supposed to be in
        user - the supposed user that we want to add a new Vlibre card (he may not be on the system)