Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SHOP Share H Save () Beautify Language Java min.java 1 import java.util.Scanner; 2. public class Main { 3- public static void main(String[] args) { 4

image text in transcribed
SHOP Share H Save () Beautify Language Java min.java 1 import java.util.Scanner; 2. public class Main { 3- public static void main(String[] args) { 4 Scanner sc = new Scanner(System.in); 5 char choice = 'Y'; 6 while(choice !='X') 7 { 8 double commission, salebonus-, carbonus=0; System.out.print("Enter total sales amount of cars sold : "); int cars = sc.nextInt(); 1 System.out.print("Enter total sales amount for this month : $"); 2 double sales = sc.nextdouble(); 3 commission = (0.10)"sales; 4 salesbonus 0.05 sales; 5 if(cars8) 6 carbonus = 0.03 sales; 7 double grosspay = commission + salesbonus + carbonus; 8 double taxAmount = 0.3"grossPay; 9 double netPay - grossPay - taxAmount; System.out.println("Commission Amount: $"+commission); System.out.println("Sales Total Bonus : $"+salesbonus); System.out.println("Number of Cars Sold Bonus : $"+carbonus); System.out.println("Gross Pay : $"+grossPay); System.out.println("Tax Amount: $"+taxAmount); System.out.println("Net Pay : $"-netPay); System.out.println(" Enter 'X' to EXIT : "); choice sc.next().charAtCo); }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions

Question

What is the major criticism of the inventory valuation rules?

Answered: 1 week ago

Question

1.Which are projected Teaching aids in advance learning system?

Answered: 1 week ago