Problem 1 – Adding contacts In this problem, you will create the skeleton for your entire assignment. In the next problems, you will add more functionality to your program. Our goal on this problem is to create a Rolodex to store names and e-mails (using 1D or 2D arrays, you can choose). The Rolodex can store up to 256 contacts. The Rolodex will store the contact's name as one String and the contact's e-mail as another String. Your application will work as follows: 1. Upon starting, it will greet the user and prompt the user to select an option (an integer) 2. There are three options in problem 1: 1 – to add contact note: If the Rolodex is full, i.e. there are 256 contacts stored, this option should print: "Roldex is Full" and ask the user to input a new option 5 – to print all contacts 0 – to exit If the user inputs an incorrect value, the program should prompt for an option again If the users select option 1: 1. The application will then ask for the contact's name and e-mail (see the example for details) 2. Then, it will add the contact to the 1D array or the 2D array 3. After, it will ask for a new option and repeat the process until the user inputs 0 Always add contacts to the first empty position of the array. If the user selects option 5: 1. The Rolodex will print the contact's name and e-mail and add 20 dashes (-) in a new line after each contact. 2. It will then ask for a new option and repeat the process until the user inputs 0 Example: Input 1 Juliano Franz juliano.franz@dal.ca 1 Alice alice@wonderland.com 5 0 output Welcome! Please Select an option: What's the name? What's the e-mail? Please Select an option: What's the name? What's the e-mail? Please Select an option: Name: Juliano Franz e-mail: juliano.franz@dal.ca -------------------- Name: Alice e-mail: alice@wonderland.com -------------------- Please Select an op

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question

Problem 1 – Adding contacts
In this problem, you will create the skeleton for your entire assignment. In the next problems, you will add more functionality to your program.
Our goal on this problem is to create a Rolodex to store names and e-mails (using 1D or 2D arrays, you can choose). The Rolodex can store up to 256 contacts. The Rolodex will store the contact's name as one String and the contact's e-mail as another String.
Your application will work as follows:
1. Upon starting, it will greet the user and prompt the user to select an option (an integer)
2. There are three options in problem 1:
1 – to add contact
note: If the Rolodex is full, i.e. there are 256 contacts stored, this option should print: "Roldex is Full" and ask the user to input a new option
5 – to print all contacts
0 – to exit
If the user inputs an incorrect value, the program should prompt for an option again
If the users select option 1:
1. The application will then ask for the contact's name and e-mail (see the example for details)
2. Then, it will add the contact to the 1D array or the 2D array
3. After, it will ask for a new option and repeat the process until the user inputs 0
Always add contacts to the first empty position of the array.
If the user selects option 5:
1. The Rolodex will print the contact's name and e-mail and add 20 dashes (-) in a new line after each contact.
2. It will then ask for a new option and repeat the process until the user inputs 0

Example:
Input
1
Juliano Franz
juliano.franz@dal.ca
1
Alice
alice@wonderland.com
5
0

output
Welcome!
Please Select an option:
What's the name?
What's the e-mail?
Please Select an option:
What's the name?
What's the e-mail?
Please Select an option:
Name: Juliano Franz
e-mail: juliano.franz@dal.ca
--------------------
Name: Alice
e-mail: alice@wonderland.com
--------------------
Please Select an option:

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning