Computer Networking: A Top-Down Approach (7th Edition)
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
Bartleby Related Questions 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.

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