Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Java program with a while loop that ends when the user answer no (see sample below for output). calculate the total cost and

Write a Java program with a while loop that ends when the user answer no (see sample below for output). calculate the total cost and the number of seed packets. We now are going to be able to order multiple types of seeds. The discount is still 10% for any one type of seed (so you do not have to change your blueprint) and the shipping discount is on the whole order.

Sample output ===============

What type of seeds do you want? (ex beans, corn, etc) image text in transcribed image text in transcribedBeans

How much does a packet of seeds cost? 3.25

How many seed packets do you want? 2

You bought 2 packs of beans seeds which cost $3.25 per pack The cost is $6.50 Your net amount with your discount is $6.50

More seeds to order(yeso) yes

What type of seeds do you want? (ex beans, corn, etc) corn

How much does a packet of seeds cost? 3.5

How many seed packets do you want? 7

You bought 7 packs of corn seeds which cost $3.50 per pack The cost is $24.50 Your net amount with your discount is $22.05

More seeds to order(yeso) no

The cost before shipping is $28.55 Your shipping cost is $6.75 The total cost of your order is $35.30 The total number of seed packets is 9

===============

Transcribed image text

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

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions