[solved]-Create Method Java Setounces Strounces String Convert String Input Provided Integer Follow Q39010763
CREATE THIS METHOD IN JAVA:
- setOunces(strOunces: String) will convert theString input provided to an integer in the following manner:
- Your method will find every third single digit in strOunces.Ignore all characters that are not a digit. Do not worry aboutnegative numbers; the – will be considered a non-numeric characternot a digit. If no third single digits are found, you will defaultto 12.
- Invoke setOunces(ounces int).
- Examples:
- 03069858 will invoke setOunces(8). It is OKthat the 0 is dropped at the beginning of an integer and anotherfollows. If 0 is the only digit the ounces number will be 0.
- A3b3c9d3 will invoke setOunces(9)
- Ssssss6ssss0sssss1sssss0ssss0ss1 will invokesetOunces(11). It is not OK to drop the 0 in themiddle or end of a ounces
- Dafs;lkdf;lkfd will invoke setOunces(12).
- 123d44633s73ff9 will invokesetOunces(367).
- aaaabbb00 will invoke setOunces(12). There isno third digit.
- aaaabbb000 will invoke setOunces(0). 0 is thethird digit.
Expert Answer
Answer to CREATE THIS METHOD IN JAVA: setOunces(strOunces: String) will convert the String input provided to an integer in the fol… . . .
OR

