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

To maker a profit , a local store marks up the prices of its items by 15% . writ

ID: 3745979 • Letter: T

Question

To maker a profit , a local store marks up the prices of its items by 15% . write a program on input / output file stream that read the original price of the item sold ( given original price $75 ) , the percentage of the marked-up price (given 15% ) , and the state tax rate 6% . The program then outputs the original price of the item , the percentage of the mark-up, the store selling price of the item, the sale tax rate. the sale tax , and the final price of the item. . ( the final price of the item is the selliing price plus the sales tax .

Explanation / Answer

CalculateFinalPrice.java

import java.util.Scanner;

public class CalculateFinalPrice {

public static void main(String[] args) {

//Declaring variables

double originalprice, markedupPrice, salestaxRate;

double sellingPrice, salestax, finalPrice;

/*

* Creating an Scanner class object which is used to get the inputs

* entered by the user

*/

Scanner sc = new Scanner(System.in);

//Getting the input entered by the user

System.out.print("Enter the original price :$");

originalprice = sc.nextDouble();

System.out.print("Enter the marked up price :%");

markedupPrice = sc.nextDouble();

System.out.print("Enter the sales tax rate :%");

salestaxRate = sc.nextDouble();

sellingPrice = originalprice + (originalprice * (markedupPrice / 100));

salestax = (salestaxRate / 100) * sellingPrice;

finalPrice = sellingPrice + salestax;

System.out.println("Selling price :$" + sellingPrice);

System.out.println("Sales tax :$" + salestax);

System.out.println("Final price :$" + finalPrice);

}

}

________________

Output:

Enter the original price :$75
Enter the marked up price :%15
Enter the sales tax rate :%6
Selling price :$86.25
Sales tax :$5.175
Final price :$91.425

____________Thank You

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