Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(Code in Java) Last name begins with B. For this test you are going to write a program to read in values for a small

(Code in Java) Last name begins with B.

image text in transcribed

For this test you are going to write a program to read in values for a small business that starts with the first letter of your last name. So if your last name is Gonzalez, you can write a program for a Grocery Store. You will need to read in one integer value, one boolean value, one decimal value and one String value. Use a Scanner to read in the data. Based on the data you read in, use a series of if, else if, else if, else to determine the price of the product or service depending on what the user entered in to the program. You will create a class based on the type of product or service you are offering that will keep track of the integer, boolean, decimal, and String. CLASS WORTH 20 points For example, you let's say your last name is Fernandez and you chose a flower shop: "Enter the number of flowers desired:" 4 "Enter if you want a vase." true "Enter your address: 123 Fake Street "Enter your local tax rate as a percent." 6.5 INPUT WORTH 30 points. OUTPUT TO THE SCREEN: "YOUR FLOWER ORDER WILL BE $19.99" After displaying the output for the product (price will depend on the type of business you select based on your last name), you will save the entire order in a file called output.txt using a Print Writer. OUTPUT WORTH 30 points. SAVING DATA WORTH 20 points

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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions