Write a ‘main’ method that examines its command-line arguments and calls the (static ) method displayHelp if the only argument is the class name. Note that displayHelp accepts no parameters otherwise, ‘main’ calls the (static ) method argsError if the number of arguments is less than four. argsError accepts the number of arguments (an integer ) as its parameter otherwise, ‘main’ calls the (static ) method processArgs, which accepts the command-line argument array as its parameter.

LANGUAGE: JAVA

CHALLENGE:

Write a ‘main’ method that examines its command-line arguments and
calls the (static ) method displayHelp if the only argument is the class name. Note that displayHelp accepts no parameters
otherwise, ‘main’ calls the (static ) method argsError if the number of arguments is less than four. argsError accepts the number of arguments (an integer ) as its parameter
otherwise, ‘main’ calls the (static ) method processArgs, which accepts the command-line argument array as its parameter.

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,

Leave a Comment

You must be logged in to post a comment.