In this Java code. I want to use a if statement instead of a try and catch variable inside of the while loop. How would I fix the code to that standard, and have the user run it as many times as they want until the user types a keyword to end the program.  The attached photos are what I have so far. Also this is what my professor requires: This program is going to give us a chance to learn how to use "if" statements and take time to plan out the steps that we want to do things.  Here is our task at hand... We need to have a program that will let the user enter a base value and an exponent value. They will pick from a menu to let the program which of the 5 choices they want to test We are going to get to use a built-in Math function to make this program work pow(). You will only be able to use the pow() function with a positive integer exponent with the choice that has a fractional exponent. You also will have that no negative base values will be entered along with a fractional exponent. But for the other scenarios the base can be a negative number. Your program must let the user test each choice from menu without having to restart the program. The output must look similar to the following: The base 6.35 raised to the power of 3/4 is 4.0001869986.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

In this Java code. I want to use a if statement instead of a try and catch variable inside of the while loop. How would I fix the code to that standard, and have the user run it as many times as they want until the user types a keyword to end the program. 

The attached photos are what I have so far.

Also this is what my professor requires:

This program is going to give us a chance to learn how to use "if" statements and take time to plan out the steps that we want to do things. 

Here is our task at hand...

We need to have a program that will let the user enter a base value and an exponent value.

They will pick from a menu to let the program which of the 5 choices they want to test

We are going to get to use a built-in Math function to make this program work pow().

You will only be able to use the pow() function with a positive integer exponent with the choice that has a fractional exponent.

You also will have that no negative base values will be entered along with a fractional exponent. But for the other scenarios the base can be a negative number.

Your program must let the user test each choice from menu without having to restart the program.

The output must look similar to the following:

The base 6.35 raised to the power of 3/4 is 4.0001869986.

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY