Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

all subreddits × ×, IST 149 l Need Java Code Written Chegg Study l Guided Sol IS

ID: 3665884 • Letter: A

Question

all subreddits × ×, IST 149 l Need Java Code Written Chegg Study l Guided Sol IST 149 onathan 018 SP16/TC295.ITP.120.HOIBSP16 ImportedConte > a https://learn.vccs.edu/bbcswebdav/pid-82817619-dt content rid-77684702,2/courses/TC295 ITP.120 Using Methods Design and write a Java program that calculates and displays the results of a sales transaction. Two classes are to be defined as follows: Class Name Sales Input Variables: quantity- an integer value price - a floating point value commissio nRate-a double value (example: 8.5%) discountPercent-a double value (example: 6.5%) (to be entered as percent values) There are four input values as defined above. These variables are to be declared inside main).The main) method of this class should accept the quantity, price, commission rate, and discount percent from the keyboard (echo the inputs back to the screen) and call the appropriate functions described below to calculate the final sales transaction amount, main) should also display the initial sales amount Processing saleAmt- The quantity and price are passed to this method. It returns the sale amount to the calling method. Methods netSale- The sale amount, commission amount, and discount amount are passed to this method. The commission amount should be added to the sale amount and the discount amount should be subtracted. Return the net sale back to the calling method. finalSale0 This method displays the net sale amount, tax and final sales amount. **You determine appropriate argument passing and return value. Class Name SalesCalcs calcComm The sale amount and commission rate are passed to this method. It calculates and displays the commission amount and passes this value back to the calling method. Methods -1 y .1114. 12:45 PM 2/6/2016

Explanation / Answer

JAVA PROGRAM TO DISPLAY SALES TRANSACTION USING TWO CLASS

class Calc

{

public static double sale(double price, double comm, double disc)

{

return (price + comm) - disc;

}

}

public class Calculator

{

public static void main (String args[])

{

double price = 500.00;

double commission = price * .05;

double discount = price * .10;

System.out.println("The result for a price of "

+ price

+ " with a commission of "

+ commission

+ " and a discount of "

+ discount

+ " is "

+ Calc.sale(price, commission, discount));

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote