Question: In console class modify getDouble method so it removes any dollar and or percent sign from the string the user enters JAVA please D Financial.java
D Financial.java DFinancial java C |.Console.java Mainjava Console.java Main.java 26 27 System.out.print(prompt) try t 28 29 30 31 32 = Integer.parseInt(sc.nextLine()); break; 1 catch (NumberFormatException e) out integer. Try again.; 34 return i; 35 36 37 public static double getDouble(String prompt) f double d-0; while (true) t 39 System.out.print(prompt); try t d-Double.parseDouble(sc.nextLineO): break; catch (NumberFormatException e) f I System.out.printlnc Error! Invalid decimal. Try again. 46 47 return d; 52 console Main (5) (Java Application) /LibrarylJaval JavavirtualMachines/jdk1.8.0.131.jdk/Contents/Home/bin/java (Jul 14, 2017, 5:12 Welcome to the Future Value Calculator Enter monthly investment: 1000 Enter yearly interest rate: 20 Enter number of years: Future volue: 29,701.79 Continue? (y) a writable Smart insert47:13
Step by Step Solution
There are 3 Steps involved in it
To modify the getDouble method to remove any dollar or percent signs you can utilize the replaceAll ... View full answer
Get step-by-step solutions from verified subject matter experts
