Question: Java programming Write a java program named SayWhat.java This program will input a single integer value from the command-line. You will write2 methods in this

Java programming
 Java programming Write a java program named SayWhat.java This program will

Write a java program named SayWhat.java This program will input a single integer value from the command-line. You will write2 methods in this class: main() and whuh) The main() method will be responsible for 1. converting the command-line input into an integer 2. extracting the 1's digit (ones), the 10's digit (tens), and any digits larger than the 10's digit (ex. if your input was 3562, the 1's digit would be: 2, the 10's digit would be: 6, and the remaining digits would be: 35) 3. call the whuh() method with these 3 values 4. print the results to the screen The whuh() method will make the following calculations: 1. using the value from the 1's digit: multiply by 7, subtract 2 then divide by 5.0. Make sure you subtract 2 before dividing 2. using the value from the 10's digit: add 3.5, multiply by 4.3 then divide by 2. 3. using the value from the remaining digits: subtract 5, multiply by 3, 4. add the 3 values calculated together and return this value find the remainder when divided by 7, then add 6. So, if your input was: 419. your program would print: The whuh value of 419 is 24.875

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!