Exercise - Create Java Application
due: in class, Jan 23 Now moved to Jan 30 - not recorded but demonstrated
You are to create a project using our designated IDE (which you must download to your laptop). Create the code to fulfill the requirements below. Demonstrate as stipulated below.
Create a Main Application Class called AddressBookApplication (a console application / command line application). The AddressBookApplication class should be part of the address package along with another class Menu that you will create.
- address = contains AddressBookApplciation class and Menu class.
AddressBookApplication class will contain the special main method making it a desktop application as discussed in class. As discussed below the main method wll invoke Menu's static methods to simply display a series of prompts to standard output.
Menu class contains the following static methods which for this exercise will print out to standard output a corresponding prompt asking for related information. Later in Project 1 you wil lmodify these methods to read user input and return these values.
- public static String prompt_FirstName();
- public static String prompt_LastName();
- public static String prompt_Street();
- public static String prompt_City();
- public static String prompt_State();
- public static String prompt_Zip();
- public static String prompt_Telephone()
- public static String prompt_Email();
Below is the output that should be printed to the standard output for the prompt_FirstName().
The other prompt_***() methods will function similarly for their **** prompt. |
If you call prompt_FirstName() from your Main application's main method as follows String first_Name = Menu.prompt_FirstName(); //for now this method will return a default vaue String like "Jane"
this will be the output on the command line % First Name: |
Again you will need to create some code in the main method of your Application class (AddressBookApplication) that calls each of the prompt_* methods which generate the appropriate prompt strings and print them out to the Standard Console Window. Again for this exercise we are not handling any standard input. So running the program will look like:
First Name:
Last Name:
Street:
City:
State:
Zip:
Telephone:
Email:
Get Starting code for our 2 classes AddressBookApplication and Menu
The Process
because this is your first exercise I am going to give you more guidance than I normally will ---here are the steps I suggest you follow.
Step 1 : Using IntelliJ IDE create a project called AddressBookApplication using the command line template project option and set the main application class to the name AddressBookApplication.
Step 2 : Compile and run ---nothing really will happen but, should run
Step 3 : Create a new class in the src folder of your project called Menu.java and copy the partial code of Menu.java from the starting code I have given you.
Step 4 : Compile and run --still nothing new happens as your AddressBookApplication's main method does nothing
Step 5 : Edit the main method of the AddressBookApplication class to look like what is shown in the starting code I have given you.
Step 6 : Compile and run --now you should see the first prompt method output something to the standard output
Step 7 : Edit both your Menu class to complete the requirements above. Also, edit the main method of the AddressBookApplication class to call ALL of the Menu's static prompt methods. Compile and Run.
DELIVERABLE:
not turned in --but, this is important to do as it helps you with project.