Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 the better value ($/in^2). Sample output is provided in the picture, as well as other details.
image text in transcribed
image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago