Question: Starting code: /* Programmer: Date: Project: Bonus Lab 2.1 Hardware File Name: Hardware.java Program Description: Determines the price of an order from a hardware store.

 Starting code: /* Programmer: Date: Project: Bonus Lab 2.1 Hardware File
Starting code:

/* Programmer:

Date:

Project: Bonus Lab 2.1 Hardware

File Name: Hardware.java

Program Description: Determines the price of an order from a hardware store.

*/

import java.util.*;

public class Hardware {

public static void main(String[] args){

// Variable to accept the user's input

Scanner keyboard = new Scanner(System.in);

// Enter your code here

}

}

Assignment Taken From Bradley Kjell, Central Connecticut State University Bob's Discount Bolttolowng prices .5 cents per bolt 3 cents per nut cent per washer Write a program Hardware,java 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 bolts; oterwise 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 specified number of items) is written out. Number of bolts: 12 Number of nuts: 8 Number of washers: 24 Check the Order: too few nuts Total cost: 108 cents

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!