Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone please help me code this program? Code a program that prompts the user for the size of the array. Using the size, the

Can someone please help me code this program?

Code a program that prompts the user for the size of the array. Using the size, the program creates several arrays that will store information about user names and IDs. There will be one array for all the user names and another one for the user IDs. The values in each array at the same location are for a given user. Once the arrays are populated, print the information from each array. The size and input will be the only fields. Use printf(). Code your program according to the specifications below. Use the looping structure generally associated with array processing. Name the program YourLastNameFirstInitialLE62.java. The methods will be called from the main(). 1st Prompt: Code this in a method named arraySize(). How many users? 2nd Prompt: In a method called setUserNames declare the userNames array and populate it. This method will return the userName array to the calling statement in the main(). The 9 in the prompt below will print 1 for the first user, then 2 for the 2nd one and so forth. Use the loop-control variable as the value for 9. Enter a name for user 9: 3rd Prompt: In a method called setUserIDs declare the userIDs array and populate it. The Xs in the prompt is the name of the user. The setUserIDs method will return the userIDs array to the calling statement as well as receive the userNames array from the calling statement. This method will be called as an argument in the call to printUserInfo(). Enter user ID for Xxxxxxxxxx? Output Specifications: Where the Xs represent the user's name and ID. Code the output print statement in a method named printUserInfo() that accepts the userIDs and userNames arrays. The title is printed only once, so the print for it has to be outside of the repetition used for array processing. Note how the user ID and name values are right justified in the output. Simply insert 4 spaces after the colon in the "User ID: " label, and 2 spaces after the colon in "User Name: " label. USER IDs & NAMES User ID: Xxxxxxxxxx User Name: Xxxxxxxxxx User ID: Xxxxxxxxxx User Name: Xxxxxxxxxx ***END OUTPUT SPECS***

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago