Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions

Question

l Define HR planning and outline the HR planning process.

Answered: 1 week ago