I am trying to create a stand-alone app that calculates the sales tax for products input by the user. I'm not sure if I'm supposed to have it in a frame, or what I'm missing to complete the process.
//Sales Taxes Calculator package SalesTaxesApp; import.java.util.Scanner; import.java.util.Arrays; public class SalesTaxApp{ public static void main(String[] args) class tax{ int qty=0; String prodName="null"; float price="false"; boolean imported="false"; boolean basic="false"; float tax=0.0f; void calculateTaxes(){ float totalTax=0.0f; if (imported) totalTax=0.05; if (basic) totalTax=0.1; if (imported)&&(basic) totalTax=0.15; tax=price*totalTax; } public String toString(){ float p=price+tax; return qty+""+prodName+":"+p; } } public class SalesTax{ public staic void main(String[] args) throw Exception{ SalesTax st=new SalesTax(); Scanner input=new Scanner(System.in); ArrayList list= new ArrayList(); int no=1; while (true){ Tax tax=new Tax(); System.out.print("Quantity:") int qty=input.nextInt(); tax.qty=qty; System.out.print("Product:"); String prod=input.net(); tax.prodName=prod; System.out.print("Price:"); float p=input.nextFloat(); tax.price=p; System.out.print("Product Imported[y/n]:"); String imp.=input.next(); if (imp.toLowerCase().equals("y")) tax.basic=true; tax.calculateSalesTaxes(); list.add(tax); no++; System.out.print("Additional Products[y/n]:"); String add=input.next(); if(add.toLowerCase().equals("n")) break; } float tp=0.0f; float tt=0.0f; for (int i=o; i<list.size(); i++{ Tax tax=list.get(i); tp+=tax.price; tt+=tax.tax; System.out.print(tax); } System.out.println("Sales Tax:"+tt); System.out.println("Total:"+(tt+tp); } }