public class Customer
{
private String name;
private String address;
private double totalPurchase;
private double invoiceAmount;
public Customer(String name, String address)
{
this.name = name;
this.address = address;
totalPurchase = 0.0;
invoiceAmount = 0.0;
}
public String getName()
{
return name;
}
public String getAddress()
{
return address;
}
public double getTotalPurchase()
{
return totalPurchase;
}
public double getInvoiceAmount()
{
invoiceAmount = totalPurchase * 1.0775;
return invoiceAmount;
}
public void updateTotalPurchase(double amount) provided
{
totalPurchase += amount;
// return totalPurchase;
// totalPurchase = totalPurchase + amount;
}
}
Above Code has no error but i am stuck on this class below as its not compling
public class DellCustomer
{
public static void main(Stirng[] args)
{
Customer neel = new Customer("Neel Smith");
System.out.println("The customer name is " + neel.getName());
System.out.println("The customer address is" + neel.getAddress());
System.out.println("The customer Totoal Purchase is" + neel.getTotalPurchase());
}
}
Here the error i get in this code
F:\JAVA\Java Files\Lab3\DellCustomer.java:3: cannot find symbol
symbol : class Stirng
location: class DellCustomer
public static void main(Stirng[] args)
^
F:\JAVA\Java Files\Lab3\DellCustomer.java:5: cannot find symbol
symbol : constructor Customer(java.lang.String)
location: class Customer
Customer neel = new Customer("Neel Smith");
^
2 errors
Tool completed with exit code 1
Please help me how to solve the error..
thanks for the help in advance