Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use Java Please and remember to print a message if the name is not in the list !!! Exercise 4. Write a program that keeps

image text in transcribed

Use Java Please and remember to print a message if the name is not in the list !!!

Exercise 4. Write a program that keeps track of students in a class. The program will prompt the teacher to enter the total number of students. Then the teacher will input the last names of all the students (multiples of the same last name are possible). Next, the program will ask the teacher to enter a name. The program will print out the indices of all matching last names in the array (or a message that the name is not in the array). The program will then ask the teacher to enter a letter, after which the program will print out all the unique names in the array that start with that letter. Finally, the program will print out the name(s) with the longest number of letters. See below for sample output: Please enter the total number of students:7 Enter the last name: Smith+ Enter the last name: Jian- Enter the last name: Theriault+ Enter the last name: Jones Enter the last name: Dillon Enter the last name: Branson Enter the last name: Jannis Enter a name to search for: Branson Branson is at index 5 Enter a letter to search on: J+ The last names that start with J: Jian Jones Jannis + The longest name is Theriault with 9 letters

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago