Package cli.commands

Class RentBicycle

  • All Implemented Interfaces:
    Command

    public class RentBicycle
    extends java.lang.Object
    implements Command
    This is the RentBicycle class that implements the rentBicycle command of the CLI.
    • Constructor Summary

      Constructors 
      Constructor Description
      RentBicycle()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean hasGoodInput​(java.lang.String[] args)
      This methods is used to check if the command has good input from the user
      static void helpCommand​(java.lang.String[] args)
      This is the help command: it displays a message to better explain the command itself
      static void main​(java.lang.String[] args)
      main() is the implementation of the command.
      static void wrongArgumentHelp()
      This method implements all the help that will be displayed to the user if he enters a wrong input
      • Methods inherited from class java.lang.Object

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

      • RentBicycle

        public RentBicycle()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
        main() is the implementation of the command. It will interact with the core.Main application rentBicycle [userID, stationID] : to let the user userID renting a bike from station stationID (if no bikes are available should behave accordingly)

        The application can have many myVelib systems (networks) and so

        Parameters:
        args - the arguments of the command
      • helpCommand

        public static void helpCommand​(java.lang.String[] args)
        This is the help command: it displays a message to better explain the command itself
        Parameters:
        args - the arguments of the command
      • wrongArgumentHelp

        public static void wrongArgumentHelp()
        This method implements all the help that will be displayed to the user if he enters a wrong input
      • hasGoodInput

        public static boolean hasGoodInput​(java.lang.String[] args)
        This methods is used to check if the command has good input from the user
        Parameters:
        args - the arguments of the command
        Returns:
        true, if the command has good input. false, otherwise