public static void mainMenu() {
try {
// Print the current todo list
System.out.println();
printList(Remote.conn.execl(new ListTodos(), "Unable to list todos"));
// Display the menu the first time
printMenu();
while (true) {
// Get the response
char response;
do {
response = (char) System.in.read();
if (response == '\n') {
printMenu();
}
response = toUpperCase(response);
} while (invalidResponse(response));
// Process it
switch (response) {
case 'L':
printList(Remote.conn.execl(new ListTodos(), "Unable to list todos"));
break;
case 'A':
addTodo();
break;
case 'E':