public class DiscountCalculator { public static void main(String[] args) { calculateDiscount(100, 15); } public static void calculateDiscount(double price, double discount) { double finalPrice = price - (price * discount / 100); System.out.println(“The final price after a ” + discount + “% discount is: ” + finalPrice); } }