You have been asked to produce a report for a hardware store The name for each item is widget with the word designating the number of the widget. There are ten widgets in all. Your program will ask the user for the range of the cost for items, range of the price of the items in doubles. The range for the quantity in stock will be between 0 and 9999 as an int. Your program will randomly generate the cost of the items, price of the items the number in stock for this sample report based upon the ranges entered. Make sure the price of the item is greater than the cost. Profit is calculated as (price- cost) * in stock. Any time quantity falls below 25 the reorder column will display Yes, otherwise it will display No. Your chart will generate data for ten items and the chart will look like the one below. Part Name Widget One Widget Two Widget Ten Cost 999.99 Price 999.99 Quantity in Stock 9999 Profit 99999.99 Reorder Yes

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please write a JAVA code with Methods

You have been asked to produce a report for a hardware store
The name for each item is widget with the word designating the number of the widget. There are ten widgets in all.
Your program will ask the user for the range of the cost for items, range of the price of the items in doubles.
The range for the quantity in stock will be between 0 and 9999 as an int.
Your program will randomly generate the cost of the items, price of the items the number in stock for this sample report
based upon the ranges entered. Make sure the price of the item is greater than the cost.
Profit is calculated as (price- cost) * in stock.
Any time quantity falls below 25 the reorder column will display Yes, otherwise it will display No.
Your chart will generate data for ten items and the chart will look like the one below.
Part
Name
Widget One
Widget Two
Widget Ten
Cost
999.99
Price
999.99
Quantity
in Stock
9999
Profit
99999.99 Yes
Reorder
Your program must properly use methods.
You will need to use a loop to control the lines of the chart and if or switch statements to control the trip numbers and
ratings. I expect to see you use the printf or String.format in this program.
Hint: complete the input first then the output using hard coded data. Then work on the randomization. This way you
will have the easier parts completed and working for a partial grade if needed.
Transcribed Image Text:You have been asked to produce a report for a hardware store The name for each item is widget with the word designating the number of the widget. There are ten widgets in all. Your program will ask the user for the range of the cost for items, range of the price of the items in doubles. The range for the quantity in stock will be between 0 and 9999 as an int. Your program will randomly generate the cost of the items, price of the items the number in stock for this sample report based upon the ranges entered. Make sure the price of the item is greater than the cost. Profit is calculated as (price- cost) * in stock. Any time quantity falls below 25 the reorder column will display Yes, otherwise it will display No. Your chart will generate data for ten items and the chart will look like the one below. Part Name Widget One Widget Two Widget Ten Cost 999.99 Price 999.99 Quantity in Stock 9999 Profit 99999.99 Yes Reorder Your program must properly use methods. You will need to use a loop to control the lines of the chart and if or switch statements to control the trip numbers and ratings. I expect to see you use the printf or String.format in this program. Hint: complete the input first then the output using hard coded data. Then work on the randomization. This way you will have the easier parts completed and working for a partial grade if needed.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Introduction to Coding
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education