Q1. JMail is a clothing retail company. They need to calculate the commission for the staff based on below rates: Less than $ XXXXXXXXXX%$ XXXXXXXXXX%$ XXXXXXXXXX12%$ XXXXXXXXXX15%$15000 or more...

1 answer below »
Q1. JMail is a clothing retail company. They need to calculate the commission for the staff based on below rates:
Less than $1000. 5%$1000-4999. 10%$5000-7999. 12%$8000-14999. 15%$15000 or more. 16%
They also allow the staff to ask for advance payment. Write a program that perform the following steps:
- Ask the staff to enter monthly sales- ask the staff to enter the amount of advance pay- Use the monthly sales to calculate the commission- calculate the staff’s pay by subtracting the advance pay from the total commission- if the amount is negative, inform the staff they cannot ask for that much advance pay


Q2. Write a program to calculate average grades for multiple students using 2D Arrays following below design
- Ask the user to enter the number of students- fir each student ask the user to enter marks for 3 subjects- save the above information in a 2D array- once all the student mark are entered calculate the average grade for each student- display the name and average score in a table


Answered Same DayJan 11, 2021

Answer To: Q1. JMail is a clothing retail company. They need to calculate the commission for the staff based on...

Saurabh Kumar answered on Jan 11 2021
147 Votes
java_assignments/jMail.java
java_assignments/jMail.java
import java.util.Scanner; 
public class J
Mail{
    public static void main(String[] args){
        Scanner input = new Scanner(System.in); 
        double monthlySales, advancePayment;
        //input for monthly sales
        System.out.print("Enter Total Monthly Sales: $");
        monthlySales = input.nextInt();
        //input for advance pay
        System.out.print("Enter Total Advance Payment: $");
        advancePayment = input.nextInt();
        System.out.println();
        //calling function to calculate commission
        double commission = calculateCommission(monthlySales);
        //rounding upto 2 decimal points
        commission = Math.round(commission*100.0)/100.0;
        System.out.println("Your total commission is: $"+commission);
        //calculating staff's pay
        double staffsPay = commission - advancePayment;
        staffsPay = Math.round(staffsPay*100.0)/100.0;
        //if staff...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here