Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN JAVA Lab: Map Processing Pizza Orders Objective In this lab you will practice using the Map component by implementing a simple prototype for the
IN JAVA
Lab: Map Processing Pizza Orders
Objective
In this lab you will practice using the Map component by implementing a simple prototype for the telephone operator's console of a new chain of pizza delivery stores.
Setup
Follow these steps to set up a project for this lab.
- Create a new Eclipse project by copying ProjectTemplate. Name the new project PizzaOrderManager.
- Open the src folder of this project and then open (default package). As a starting point you can use any of the Java files. Rename it PizzaOrderManager and delete the other files from the project.
- Follow the link to PizzaOrderManager.java, select all the code on that page and copy it to the clipboard; then open the PizzaOrderManager.java file in Eclipse and paste the code to replace the file contents. Save your file.
- Save the following three files to the data folder in your project (in your browser, you should be able to accomplish that by right clicking on each link and selecting Save Link As... or Save target as... or the equivalent entry from the contextual menu):
- orders.txt
- sizes.txt
- toppings.txt
Method
- First carefully look through the file PizzaOrderManager.java and the main method in particular. You may also want to look at the three text files you created in the data folder to make sure you understand the format for these files.
- Complete the given class by pasting the bodies of the getPriceMap and getOneOrder static methods you wrote for the homework into the PizzaOrderManager.java file, and complete the body of the putPrice static method.
- Run the program and check that the output matches the expected output based on the input files provided.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started