Package cli.commands
Class Setup
- java.lang.Object
-
- cli.commands.Setup
-
-
Constructor Summary
Constructors Constructor Description Setup()
-
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 userstatic void
helpCommand(java.lang.String[] args)
This is the help command: it displays a message to better explain the command itselfstatic 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
-
-
-
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 setup [velibnetworkName]: to create a myVelib network with given name and consisting of 10 stations each of which has 10 parking slots and such that stations are arranged on a square grid whose of side 4km and initially populated with a 75% bikes randomly distributed over the 10 stationssetup [name, nstations, nslots, s, nbikes]: to create a myVelib net- work with given name and consisting of nstations stations each of which has nslots parking slots and such that stations are arranged in as uniform as possible manner over an area you may assume either being circular of radium s or squared of side s (please document what kind of area your implementation of this command takes into account and how stations are distributed over it).Furthermore the network should be initially populated with a nbikes bikes randomly distributed over the nstations stations
- 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
-
-