Package cli
Class MyVelibCLI
- java.lang.Object
-
- cli.MyVelibCLI
-
public class MyVelibCLI extends java.lang.Object
This is the class that implements the interpreter or the CLI. Here basically we have a while loop that will only exits when the user writes "exit" in the terminal. Otherwise, the program will wait for new commands and execute the main() method of each command class.
-
-
Constructor Summary
Constructors Constructor Description MyVelibCLI()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
This is the main() method of the CLI class.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
This is the main() method of the CLI class. It waits for the users to call the "myvelib" program and expect 0 or 1 argument. If there are 0 arguments, then we will enter in the interpreter mode (just like python) If there is 1 arguments, the CLI will assume it is a file path and will run the runTest command with the file provided.- Parameters:
args
- the command-line arguments
-
-