Sunday, November 09, 2008

Task: Hello World

Everything starts with a HelloWorld, and so shall we :-)

Write a HelloWorld program that takes in command line parameters to determine what should be printed. The program usage is as follows:

HelloWorld -g -n
-g A compulsory parameter which denotes a greeting such as Hello, or Hi
-n
A compulsory parameter which denotes the name that will follow the greeting in the output

Running
HelloWorld -g Hello -n Parag

will print

"Hello Parag"

HelloWorld -g Hello
Should print the usage string

If any of the arguments are not provided, the program should abort with a usage string.

Describe what you did, including any problems you may have faced, and how you overcame them, in a blog post.

Leave a comment here after completing the task.

No comments: