ok, from the beginning, I want to read these command inputs from the user: Enter, Sort, Find, Display, Quit, ?.
for "?", the program will tell the user all the commands.
for "Enter", user gets to type some number
for "sort", the program will sort the list user just typed in
....
and the program will display this for user input: """"Data> (command from user)"""...
User Profile
Collapse
-
-
yea, the program will need to run first, i got that part, currently working how to differ different COMMAND, I hav 5 commands in this program, how can i direct each command to what they do.Leave a comment:
-
trying to build a Java program
Im trying to build a java program that reads user's input as a command, currently, i want to make 2 commands: Enter and Quit
if the user type Enter as a command, the program will run, if the user type Quit, the program will halt.
how can i justify whether its a Quit command or a Enter command? Also, how can I vertify if they write the command in prefix, for example, instead of type Quit, the user typed Q, or Qu, or Qui, ignore the... -
just a simple Question
System.out.prin t("data> ");
command=scan.ne xtLine();
if (command == "Enter")
System.out.prin tln("yes");
how can i vertify if command == "Enter"
No activity results to display
Show More
Leave a comment: