/* Rob Arseneault
* Harrison Trimble
* Mrs. Purves
* J1
*/
import java.io.*;
class Part2
{
public static void main (String[] args) throws IOException
{
InputStreamReader inStream = new InputStreamReader (System.in);
BufferedReader stdin = new BufferedReader (inStream);
String inNuts, inBolts, inWashers; // Declares variable for input
int Nuts, Bolts, Washers, totalBT, totalAT, dollars, cents;
System.out.println ("All values must be above minimum requirement. (50)");
System.out.println ("Enter an amount of testies to purchase: "); // Command which tells user to input a number
inNuts = stdin.readLine ( ); // Reads input
Nuts = Integer.parseInt (inNuts); //Converts char into an int
System.out.println ("Enter an amount of bolts to purchase:"); // Command which tells user to input a number
inBolts = stdin.readLine ( ); // Reads input
Bolts = Integer.parseInt (inBolts); //Converts char into an int
System.out.println ("Enter an amount of washers to purchase:"); // Command which tells user to input a number
inWashers = stdin.readLine ( ); // Reads input
Washers = Integer.parseInt (inWashers); //Converts char into an int
if (Nuts < 50||Bolts < 50||Washers < 50) // If numbers are less than 50 then do:
System.out.println ("Check the amount and reorder the minimum."); //this. outputs this statement
else
{
Nuts = (Nuts * 10); // Calculate price of Nuts
Bolts = (Bolts * 5); // Calculate price of Bolts
Washers = (Washers * 2); // Calculate price of Washers
totalBT = (Nuts + Bolts + Washers); // Calculate price of total cost before tax
dollars = totalBT / 100; //Calculates dollars
cents = totalBT % 100; //Calculates cents
System.out.println ("Your Sub-Total is " + dollars + " dollars and " + cents + " cents.");
totalAT = (Nuts + Bolts + Washers);// Calculate price of total cost after tax
totalAT = ((totalAT * 113) / 100);
dollars = totalAT / 100;//Calculates dollars
cents = totalAT % 100;//Calculates dollars
System.out.println ("The total cost of your order is " + dollars + " dollars and " + cents + " cents.");
System.out.println ("Thanks for shopping at Home Depot.");
}
}
}