Question: Write both sections in the same package. Part A. Write a program Part A and implement the following in the main method: Declare an array

 Write both sections in the same package. Part A. Write a

Write both sections in the same package. Part A. Write a program Part A and implement the following in the main method: Declare an array arr1 and initialize it to 1, 2, 3, 4, 5, 6, 7, 8, and 9 (From this point on, use the variable length instead of a number to define the capacity of the array.) Declare another array arr2, same length of arr1, without entering any integers. Using a for loop print arr1 displaying all elements on one line, separated by a comma (commas must be placed only between numbers). Using a while loop, print arr2 displaying all elements on one line, separated by a dash (dashes must be placed only between numbers). Using a for loop, copy all the values of arr1 into arr2 in reverse order. Using a while loop copy all elements of arr1 into arr2 in reverse order. Using a do/while loop print arr1 displaying all elements on one line, separated by a comma. Using a for loop, print arr2 displaying all element on one line, separate by a dash. Part B. Write a program, Part B, that contains an array of five names and another array of five passwords (your choice). Use the following Names/Passwords in your string arrays (case sensitive): Bob/jelly Jane/clock Jill/tree Sean/computer Mel/chip Your program should ask the user to enter a name and a password. If the user enters the correct name with its related password, grant access. If the user enters the wrong name/password (can be either or both), allow the user to re-try only once. If the user still cannot enter the correct name/password, display the following: "Sorry, your name/password does not match our database. Contact the administrator

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!