Question: solve in Java 1. Wnte a Java function that takes an array list of integers and returns a statistics HashMap that contains minimum, maximum, sum,

1. Wnte a Java function that takes an array list of integers and returns a statistics HashMap that contains minimum, maximum, sum, and average. The keys of HashMap should be String that represent their assigned integer value. The below should illustrate this further. The heading of the function should be as follows: public static HashMapestring, Integer> getStats (Arraylisteinteger> Ust) \& return null: Once the body of the above method is implemented, return the HashMap and not null. 2. Write a Java program for a small pizzeria that sells pizza of varying sizes. Use a HashMap data structure (i.e., key value pairs) where the key is the size and the value is price. Your program should store the following pizza sizes and prices in a HashMap: - Small: 8.99 - Medium: 11.9 - Large: 14.76 - XLarge: 18.9 Requirements: 1. Your program should display a menu of pizza sizes and prices 2. Your program should allow the user to choose pizza size 3. Your program should ensure that the HashMap contains the size entered by the user. Otherwise, return invalid! Tip, remember contains function 4. Your program should ask the user whether to add any of the following toppings: mushrooms: 3.99, peppers: 2.99, extra cheese: 3 . Then, add the toping's price to the total price. 5. The system should ask the user whether to add more toppings or continue. If the user requires more toppings, using a loop, repeat this process and allow the user to select another topping and change the sum. 6. The system then should return total price which is toppings + pizza size 7. In addition to the previous section, display the price including tax (assume tax is: 8% )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
