Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

A large company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9% of their gross sales for that week.

350.89

Develop a Java application that inputs one salesperson's items sold for last week and calculates and displays that salesperson's earnings. There's no limit to the number of items that can be sold.

this is what i did :

//Sales Commission Calculator 

import java.util.Scanner; 

public class Sales 

public static void main(String args[]) 

double gross = 0.0; 

double gross = earnings; 

double commission = 0; 

int itemNumber = 0; 

int numberSold; 

int totalItemsSold = 0; 

Scanner keyboard = new Scanner(System.in); 

System.out.print1n("Enter the sales of the four" +" items sold by the sales" +"person for the last week" +"as prompted"); 

while (itemNumber < 4 ) 

itemNumber++; 

System.out.print("Enter number of item-"+(itemNumber)+"sold" +"in last week: "); 

numberSold = keyboard.nextInt(); 

if (itemNumber == 1) 

gross += numberSold * 239.99; 

totalItemsSold += numberSold; 

else if (itemNumber == 2) 

gross += numberSold * 129.75; 

totalItemSold += numberSold; 

else if (itemNumber == 3) 

gross += numberSold * 99.95; 

totalItemsSold += numberSold; 

else if (itemNumber == 4) 

gross += numberSold * 350.89; 

totalItemsSold += numberSold; 

System.out.printf("nThe sales person sold %d" + "items in last weekn", totalItemsSold); 

System.out.printf("Overall sales done by the" + " sales person is: $%.2fn", gross); 

commission = (9.0/100) * gross; 

System.out.printf("nCommission earned by the" + "sales person is: $%.2fn", commission); 

earnings = 200.00 + commission; 

System.out.printf("nCommission earned by the" + " sales person is: $%.2fn", commission); 

earnings = 200.00 + commission; 

System.out.printf("Earning of the sales person" + " int the last week is: $%.2f", earnings); 

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question