<div style='background-color: none transparent;'></div>
Home » » price calculation

price calculation



public class FinalPrice{
private static double percent_markedup= 25;
private static double original_price = 100;
private static double sales_tax_rate = 2;

public void calculatePrice(){
double storeSalPrice = original_price*percent_markedup/100;
double tempSalPrice = original_price+storeSalPrice;
double tempTaxPrice = tempSalPrice*sales_tax_rate/100;
double taxSalPrice = tempSalPrice+tempTaxPrice;
double finalPrice = tempSalPrice+tempTaxPrice;
System.out.println("The original price="+original_price);
System.out.println("The markedup percentage="+percent_markedup);
System.out.println("The store Selling price="+tempSalPrice);
System.out.println("The sales tax rate="+ sales_tax_rate);
System.out.println("The sales tax price="+ tempTaxPrice);
System.out.println("The final Price="+ finalPrice);
}
public static void main(String args[]){
FinalPrice finalPrice = new FinalPrice();
finalPrice.calculatePrice();
}
}


Share this article :
 
Copyright © 2011. B.Sc B.Tech MCA Ploytechnic Mini,Main Projects | Free Main Projcets Download | MCA |B.tech . All Rights Reserved
Company Info | Contact Us | Privacy policy | Term of use | Widget | Advertise with Us | Site map
Template Modify by Creating Website. Inpire by Darkmatter Rockettheme Proudly powered by Blogger