Skip to content

Latest commit

 

History

History
25 lines (14 loc) · 923 Bytes

File metadata and controls

25 lines (14 loc) · 923 Bytes

James Kollilon Barclay III

Weekend Project Assignment

How it works:

  • The first thing it does is ask the user for their first name
  • Secondly, the system asks the user for their budget
  • After that the user is prompted to enter their budget amount
  • Lastly they need to input their coupon code

Methods/Steps used:

  • Random Number Generation – Using java.util.Random to create random numbers for visit IDs, item prices, and tax rates.

  • User Input – Using java.util.Scanner to let the user enter their budget.

  • Math Utility Methods – Using Math.min() and Math.max() to make sure totals stay in the budget.

  • Conditional Statements – Using if / else to check if the total goes over the budget or if there’s money left.

  • Math Calculations – Adding item prices, calculating subtotal, tax, and the final total.

  • String Formatting – Making money values look neat with two decimal places.