Due: February 18, Thursday, 11:00 am.
Language: Java
Submission:
Context: You are asked to write a simple command line based note taking program. It will have a small menu to interact with the user. Taken notes will be saved in files with extention .ncat.
Provide a console-based interaction for the user to be able to take notes. Your interface should allow the user to:
Your program should be console-driven, that is it should start up, prompt the user for input, and be able to perform any combination of valid operations without exiting (unless the command exit is provided by the user). Put a sign (e.g. >, $ or #) to indicate the command line prompt.
The list of commands for the command line:
Observe the sample run provided below. The program runs continuously until user enters “exit”.
buse@buse src $ java NoteCat
> help
noteCat 0.0.1 - simple console notetaking program
USAGE: noteCat <COMMAND>
OPTIONS:
new <note> Create new note. End your note with "#END"
show <note> Display existing note
help Prints this help menu
exit Terminates NoteCat
> new note01
Enter your note
I spent my friday to write NoteCat.
#END
> new note02
Enter your note
I hope you enjoy it as much as I did :)#END
> new CAUTION
Enter your note
Pay attention to how notes are taken. For instance, I can put #END here, and it won't save the rest.
> show note01
I spent my friday to write NoteCat.
> show note02
I hope you enjoy it as much as I did :)
> show CAUTION
Pay attention to how notes are taken. For instance, I can put
> exit
buse@buse src $
As mentioned above, you should also be able to print error messages for wrong commands. An example is given below.
buse@buse src $ java NoteCat
> hlp
Invalid menu control command
> ext
Invalid menu control command
> new new note
Invalid number of arguments
> nw note
Invalid note taking command
> exit
HINTS:
Penalties: