Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Objectives: Practice loop, text processing, and modular design with static methods An alien species uses 14-based numbering system. Their ten digits, 0 through 9, are
Objectives: Practice loop, text processing, and modular design with static methods An alien species uses 14-based numbering system. Their ten digits, 0 through 9, are the same as our decimal system. They use A, J, Q and K to represent decimal 10, 11, 12 and 13, respectively. They hire you to write a Java program to do the summation of their two numbers The program should prompt users for two 14-based numbers and then display the summation and the product of those two entered 14-based numbers. The outputs should also be 14-based. (They are unwilling to learn our decimal systems!) For example, if inputs are 17 and 96, their sum and product should be AK and 1020, respectively User interface specifications: Input o The program prompts users for two 14-based numbers. A 14-based number is a string that contains a combination of digit characters and letter characters of A, J, Q and K, case insensitive. Your program should direct users to input the two numbers, separated by space(s), on the same line " The data input line is immediately below the prompt message line. In other words, after the prompt message is displayed, your program should force users to enter the two numbers on a new line immediately below the prompt message Your program has to check the validity of input numbers. You can assume input numbers neither are negative nor contain decimal point. o An example of input session is illustrated as below: Please enter two 14-based numbers on next line 17 96 Output o Two 14-based numbers that are sum and product of the two input 14-based numbers. Code specifications The header comment lines at the top of the file contain a brief description of the program. The description should be one or 2 lines long describing the purpose of the program
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started