Exercsie 1 --- class code PARTIALLY DONE****
AddressBookApplication and Menu classes
package address; /** main AddressBookApplication: purpos e is to invoke some methods of the Menu classs
**/
class AddressBookApplication {
public static void main(String args[]) {
// Menu is a class with a bunch of static methods --so we do not // need to create an instance to invoke those methods //Call ALL of the Menu prompts
Menu.prompt_FirstName());
Menu.prompt_LastName());
}
}
=========================================================================
Following should be in a file called Menu.java
package address; /**
* Menu has a number of static prompt* methods that will ask user for details about
* a new person for use in an addressbook.
*/
public class Menu {
/**
* prompt for First Name
* @return the First Name entered in by the user, if nothing entered in will use default
*/
public static String prompt_FirstName(){
System.out.println("First Name:");
//for now return a default first name
return "Jane";
} //***YOU NOW FINISH CODE TO CALL ALL the rest of the Menu prompts and display to standard output
}
TIP: How to change the name of a class in IntelliJ IDE (refactoring)
(For example, YOU can use the Main autogenerated class when you make a new Project if you call it AddressBookApplication)--see below how to do this