import java.util.Scanner;
public class Sales
{
private String salespersonName;
public Sales( String name )
{
salespersonName = name;
}
public void setSalesPersonName( String name )
{
salespersonName = name;
}
public String getSalesPersonName()
{
return salespersonName;
}
public void displayMessage()
{
System.out.printf( "Welcome to the sales calculator for\n%s\n\n",
getSalesPersonName() );
}
Scanner input = new Scanner (System.in );
int product1;
int product2;
int product3;
int product4;
int totalSales;
int totalCommision;
int totalPayroll;
[U]System.out.Println("Enter total number of product 1 sold: " );[/U]
[U]product1 = input.nextInt();[/U]
[U]System.out.println("Enter total number of product 2 sold: " );
product2 = input.nextInt();
System.out.println("Enter total number of product 3 sold: " );
product3 = input.nextInt();
System.out.println("Enter total number of product 4 sold: ");
product4 = input.nextInt();
totalSales = ((product1 * 239.99) + (product2 * 129.75) +
(product3 *99.95) + (product4 * 350.89));[/U]
[U]totalCommision = (totalSales * .09);
totalPayroll = (totalCommision + 200);[/U]
[U]System.out.printf("The total amount of your sales are:%d\n, totalSales");
System.out.printf("Your total Commision is: %d\n, totalCommision");
System.out.printf("Your total paycheck is:%d\n, totalPayroll");[/U]
}
I know I am probably missing something simple but I cant seem to find the errors. There is 21 errors and I feel as if it would be too much to post them all. I'm brand new to Java and im slamming my head against a wall here, I could really use some help!
43: error: <identifier> expected
System.out.Println("Enter total number of product 1 sold: " );
64: error: illegal start of type
System.out.printf("Your total paycheck is:%d\n, totalPayroll");