Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your program will ask the customer how many bagels, biscuits, muffins and rolls they want and then print out the total number of items, and

Your program will ask the customer how many bagels, biscuits, muffins and rolls they want and then print out the total number of items, and the total bill. For example, if there were 10 bagels, 4 biscuits, 12 muffins, and 8 rolls, then it would print out that the total number of items is 34, and the bill is 192.Instructions:1.Create a new BlueJ project, Lab2, with a class called Bakery2.Replace the contents of Bakery with a main method3.Before writing any code, write an algorithm in pseudocode, describing the steps required to solve this problem -- think of the necessary input, processing, and output. For example,1.ask the customer for the number of bagels 2.store the number of bagels in a variable, numBagels; etc.Write the pseudocode in the comment block at the top of the file4.Paste the pseudocode into the main() method of Bakery, as single line comments, e.g.,// ask the customer for the number of bagels// store the number of bagels in a variable, numBagels5.Now implement your program: beneath each comment, write a Java statement to accomplish the task, e.g.,// ask the customer for the number of bagelsSystem.out.print("# of bagels: ");// store the number of bagels in a variable, numBagelsnumBagels = _______________; 6.Your variables should all be ints.

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_2

Step: 3

blur-text-image_3

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

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions

Question

=+What is your birthplace?

Answered: 1 week ago

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago