Question: Using Java Create a method called findLocation that takes a 2D array and a string called name . The 2D array has two columns to

Using Java

Create a method called findLocation that takes a 2D array and a string called name. The 2D array has two columns to store the character and location information. This method should search the first column of the array (i.e., character) for the name argument.

If name appears in the 2D array, return the corresponding location.

If name does not appear in the 2D array, return Sorry! The character you are looking for is not in the park today!

For example, findLocation(characterLocations, Belle) should return Fantasyland.

The signature of the method findLocation is:

public static String findLocation(String[][] storedValue, String name)

Create a 1D array of string, called menuItems, to store the names of the menu items. B. Create a 1D array of integer, called menuPrices, to store the prices of the menu items. C. Read the menuItems.txt file and add the menu items into the menuItems array. D. Read the menuPrices.txt file and add the menu prices into the menuPrices array. This array should be of type int. E. Print the menuItems and menuPrices arrays as follows: Item 1. Churro - $5 Item 2. Ice Cream - $4

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!