Please write a program to get an array of names from the user, then input one name from user, and delete all occurrences of that name from the list. Sample output is below: How many names do you want to enter? 5 Enter a name: Craig Enter a name: Craig Enter a name: Constance Enter a name: Jonathan Enter a name: Craig which name are you looking for? Craig Removing Craig from the array. Removing Craig from the array. Removing Craig from the array. Here are the remaining names: Constance Jonathan

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

Write a Java program that

program should include at least 3 functions including main.

 

Please write a program to get an array of names from the user, then input one name from user, and delete all
occurrences of that name from the list. Sample output is below:
How many names do you want to enter? 5
Enter a name: Craig
Enter a name: Craig
Enter a name: Constance
Enter a name: Jonathan
Enter a name: Craig
which name are you looking for?
Craig
Removing Craig from the array.
Removing Craig from the array.
Removing Craig from the array.
Here are the remaining names:
Constance Jonathan
How many names do you want to enter? 3
Enter a name: Craig
Enter a name: Serafina
Enter a name: Tobias
Which name are you looking for?
David
Name not found.
Here are the remaining names:
Craig Serafina Tobias
Transcribed Image Text:Please write a program to get an array of names from the user, then input one name from user, and delete all occurrences of that name from the list. Sample output is below: How many names do you want to enter? 5 Enter a name: Craig Enter a name: Craig Enter a name: Constance Enter a name: Jonathan Enter a name: Craig which name are you looking for? Craig Removing Craig from the array. Removing Craig from the array. Removing Craig from the array. Here are the remaining names: Constance Jonathan How many names do you want to enter? 3 Enter a name: Craig Enter a name: Serafina Enter a name: Tobias Which name are you looking for? David Name not found. Here are the remaining names: Craig Serafina Tobias
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 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