Question: USING JAVA. For part 2 instead of of reading the txt file can you help me put it into arrays. Part 3 i need help

USING JAVA. For part 2 instead of of reading the txt file can you help me put it into arrays. Part 3 i need help completing it too as well.

Here is my code. for Part 1

import java.util.Scanner;

public class ParkManager {

public static void main (String[] args) throws java.lang.Exception

{

String characterLocations[][] = {{"Mickey Mouse", "Main Street USA"}, {"Minnie Mouse", "Toon Town"}, {"Goofy", "Frontier Land"}, {"Pluto", "Tomorrowland"}, {"Belle","FantasyLand"}, {"Jasmine", "Adventureland"}};

for(int i=0;i

}

Scanner sc = new Scanner(System.in);

System.out.print("Enter the Character to find the location:");

String character = sc.nextLine();

findLocation(characterLocations, character);

}

public static void findLocation(String[][] characterLocations , String character){

for(int i=0;i

if(characterLocations[i][0].equalsIgnoreCase(character)){

System.out.println(characterLocations[i][1]);

return;

}

}

}

}

Here are the menuItems.txt and menuPrices.txt files in the table below.

menuItems.txt menuPrices.txt
Churros 5
Ice Cream 4
Hamburger 9
Cheeseburger 10
Turkey Leg 13
Corn Dog 7
Pizza 9
Funnel Cake 6
Soda 5

USING JAVA. For part 2 instead of of reading the txt file

PartI Disneyland ResortC has a set list of menu items and prices. The list of items that you are most interested in has been set into two files (menultems.txt and menuPrices.txt). The first file contains a list of strings (menu items) separated by a comma. The second file contains a list of integers separated by a comma (item prices). Assume you can have a maximum of 12 items. A. Create one array of strings to hold the names of the menu items named menuitems[]. B. Create one array of integers to hold the prices of the menu items named menuPricesll C. Read the menuitems.txt file and add the menu items into the array menu!tems[]. D. Read the menuPrices.txt and add the menu prices into the array menuPricesl) E. Print the values of the menultems and menuPrices arrays as follows: Item 1. Churro - $5 Item 2. Ice Cream - $4 Part III Based on the information gathered in Part II. You will now set up a system to take a food order. A. Request the user to let you know if you could take their order. They should reply either "Y" or "N". If answer is "Y"proceed to B. If answer is "N" your program should exit, unless you do the bonus in Part IV Prompt the user for an order B. a. "Enter 1 for Churro" b. "Enter 2 for Ice Cream" c. "Enter 3 for Hamburger" C. You will print out a message saying what they just ordered and the price of that item D. Keep track of the total price of their order. E. After each order ask them if they would like to order another item. They should reply F. When they are done ordering food they should be asked if they are an annual pass holder a. If they are annual pass holders, they should be given a discount, otherwise they G. Tell the user the total amount due (do not worry about tax, nor receiving money. We will either "Y" or "N". (Annual pass holders will receive a 15% discount on the entire order) will pay full price assume that everyone will pay before they get to eat). Print a message that thanks them for their purchase and be sure to remind them to have a wonderful day

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!