Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Coding question for java. So im making a shopping program and the first thing we get is user input for number of items bought. after

Coding question for java.

So im making a shopping program and the first thing we get is user input for number of items bought.

after that depending on the amount of items bought we need to ask the user for the price of every item ex.

please enter number of items: 2

please enter price of item 1

please enter price of item 2

if the number is less than 1 or greather than a thousand it will reloop and ask the user again for the price.

it also needs to count the number of invalid attempts made by user (invalid being out of bounds from 1 and 1000)

using loops and begginer java knowledge how would one code this. no use of arrays just loops and if else statements etc...

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

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions