Event materials calculator
The calculation uses A$12 per pack and accepts 1–100 packs. It opens at 8 packs, giving a materials subtotal of A$96. Change the quantity and check the result against your own calculation.
Unit price: A$12 per pack
Amounts are in AUD. The materials subtotal excludes shipping and taxes.
Write the rules first
The input is an integer quantity from 1 to 100 at A$12 per pack. Increasing or decreasing changes both quantity and subtotal. At either limit, disable the corresponding button.
Describe it to the coding assistant
“Build an event materials calculator at A$12 per pack. Accept 1–100 whole packs, defaulting to 8. Show quantity, unit price and subtotal. Include increase, decrease and reset controls. Make it readable on mobile. Do not submit orders or collect contact information.” Start with that scope.
Open the code
Save the files and note how to open them. An HTML/CSS/browser-script project can open locally; a project with dependencies or a development server needs its documented setup. Keep the error text, action and recent change when asking for help, without sharing credentials or personal records.
Check the result
Verify 8×12, then 1 pack, 100 packs and reset. Rapid clicks must keep quantity and subtotal consistent. Check narrow screens and keyboard controls before adapting the business rules.