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

In console class modify getDouble method so it removes any dollar and or percent sign from the string the user enters JAVA please
 In console class modify getDouble method so it removes any dollar

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

1 Expert Approved Answer
Step: 1 Unlock

To modify the getDouble method to remove any dollar or percent signs you can utilize the replaceAll ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!