Question: Use Java Write a class named Number Table that prints a tabulated report of three numbers and their indices. The main method of NumberTable prompts
Use Java

Write a class named Number Table that prints a tabulated report of three numbers and their indices. The main method of NumberTable prompts the user to enter the field width for the index. It then prompts the user to enter the field width for the number. It then prompts the user if he or she wants to display commas If commas are not selected, it prompts the user if he or she wants to display leading zeros. It then prompts the user for number 1 followed by its index, number 2 followed by its index, and finally number 2 followed by its index. If the user enters the following index width number width20 display commas: number1 number 1 index50 number 2 number 2 index 444 number 3 number 3 index 32 :125.456 44367754.1 : 7965.123 the following report is generate INDEX: INDEX: [ INDEX: [ 501 NUMBER: 444] NUMBER: [ 321 NUMBER: 125.461 44,367,754.10] 7,965.12]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
