import java.io.*; import java.text.*; public class vdfunction { static final double RATE=1.045; public static void main(String []args) throws IOException { double cost; BufferedReader in = new BufferedReader (new InputStreamReader(System.in)); System.out.print("Please enter the cost of the item: "); cost=Double.valueOf(in.readLine().trim()).doubleValue(); Calc_tax(cost); } public static void Calc_tax(double cost) { double total=cost*RATE; System.out.println("Total with tax is: "+total); } }