Question: Problem #1 : Create a menu-driven DigitExtractor application that prompts the user for an integer and then displays the ones, tens, or hundreds digit of
Problem #1: Create a menu-drivenDigitExtractorapplication that prompts the user for an integer and then displays the ones, tens, or hundreds digit of the number. This program must have two classes:DigitExtractorandNum.
The DigitExtractor class should contain themain()method. The main() method should prompt the user for an integer and this number should be passed to the constructor in the Num class.
The Num class should contain the constructor, the wholeNum() method which should return the whole number to the main() method, the onesPlace() method which should return the ones digit to the main() method, the tensPlace() method which should return the tens digit to the main() method, and the hundredsPlace() method which should return the hundreds digit to the main() method..
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
