Question: 9:55 0 ...xythos.s3.us-east-1.amazonaws.com G CMPSC 3313 Advanced Programming Languages Programming Assignment #1 Due Date: Jan. 27, 2020, 11:59PM Order Checker Bob's Discount Bolts charges the

 9:55 0 ...xythos.s3.us-east-1.amazonaws.com G CMPSC 3313 Advanced Programming Languages Programming Assignment

9:55 0 ...xythos.s3.us-east-1.amazonaws.com G CMPSC 3313 Advanced Programming Languages Programming Assignment #1 Due Date: Jan. 27, 2020, 11:59PM Order Checker Bob's Discount Bolts charges the following prices: 5 cents per bolt 3 cents per nut 1 cent per washer Write a Java program that asks the user for the number of bolts, nuts, and washers in their purchase and then calculates and prints out the total. As an added feature, the program checks the order. A correct order must have at least as many nuts as bolts and at least twice as many washers as blots, otherwise the order has an error. For an error the program writes out Check the Order: too few nuts or Check the Order: too few washers" as appropriate. Both error messages are written if the order has both errors. If there are no errors the program writes out "Order is OK." In all cases the total price in cents of the specified number of items) is written out. For example: Input: Number of bolts: 12 Number of nuts: 8 Number of washers: 24 Output: Check the Order: too few nuts Total cost: 108 Use constants for the unit cost of each item. In other words, declare constants such as final int bolt Price = 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!