Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Write a method String [ ] addName ( String [ ] names ) that can find out if a String array with 1 0 positions

Write a method String[] addName(String[] names) that can find out if a String array with 10 positions is full or has additional free positions. If the array is full the program should print a message to the user and terminate. If any free position is available the program should prompt the user to add a name to the array and assign the name entered to the next free position in the array. The program should repeatedly add the user to enter names until either the user says no or the array is full. If any names are added the program should print the new array with a message.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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