Question: Using novice level code (java 1), write a program with user input and loops that compares different pizza companies (that the user enters) to determine
Objectives . Practice problem solving . Practice writing Java .Practice with selection; console input, output, and using printf() Problem Statement Given the nam ) of two different pizzas, determine which is the better value (lower cost per square inch). The program should prompt the user for the name, price, and diameter for one pizza; then ne name, price, and size of a second pizza. Then the program prints the name and price per square inch of the better value. If the two pizzas are of the same value, then the program should display a message to that effect. Example run of the program: (user input is in blue) First pizza name: Dominos cheese First pizza price: 10.99 First pizza diameter: 16 Second pizza name: Imos meat Second pizza price: 8.99 Second pizza diameter: 14 Doninos chese ts a better value (0.1/q.in.) than tnos neat 659/s, ) Notes: The name of the pizza could have a space Prices should be entered as dollars and cents (no dollar sign) Diameters are integer values The price should be displayed to the penny with a dollar sign (not arbitrary number of digits) Eaualitv should be compared to the penny
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
