Suppose you wanted to harness to power of wind to generate electricity. One question you might want to ask is: what is the amount of power my wind turbine can produce? To answer this question, you will need at least the following information: The average wind speed (in m/s) The operating efficiency of your wind turbine (in %) The radius of the blades on your wind turbine (in meters)

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

Suppose you wanted to harness to power of wind to generate electricity. One question you might want to ask is: what is the amount of power my wind turbine can produce? To answer this question, you will need at least the following information:

  • The average wind speed (in m/s)
  • The operating efficiency of your wind turbine (in %)
  • The radius of the blades on your wind turbine (in meters)

To compute the maximum power output for your wind turbine, you would need the following math formulas:

  • A= πr2, which represents the cross-sectional area of a circle (π = 3.14159265).
  • Pmax = 0.5ρAv3, which calculates the maximum available power given the wind speed in m/s (ν), cross-sectional area of the blades in m2 (A), and the density of the air (ρ 1.2 kg/m3).

Once you have the maximum available power, computing the actual amount of power (not the maximum) produced by the wind turbine is a matter of determining the amount of power based on the operating efficiency.

Exercise #1: Create a Java class called WindPowerIST140, and save the file as WindPowerIST140.java in your Java development environment. This program will ultimately compute the amount of power produced by a wind turbine, but we will be building the program in stages. In this exercise, we will take care of the user input. Your program should take three double inputs:

  • The average wind speed (in m/s)
  • The operating efficiency of your wind turbine (in %)
  • The radius of the blades on your wind turbine (in meters)

Your program should create three variables to store these values, followed by appropriate user prompts and input statements (Hint: use the Scanner class). Once the input is complete, your program should end. Here are few sample tests you can run to check if your program is working correctly; your prompts should appear exactly as shown here, and you can type in the listed input values when prompted:

Test Case #1

Enter the Average Wind Speed (in m/s): 5.0

Enter the Operating Efficiency [0...1]: 0.98

Enter the Blade Radius (in meters): 2.0

Test Case #2

Enter the Average Wind Speed (in m/s): 12.29

Enter the Operating Efficiency [0...1]: 0.10

Enter the Blade Radius (in meters): 3.0

Exercise #2: Now that you have the input statements complete, you will add code to echo-print the input values to the user along with descriptive messages and units. This will simply involve adding three System.out.printf statements to your code. All numeric amounts should be precise to two decimal places: remember this involves using the %f edit descriptor with the System.out.printf method, as shown below:

/*

Show two digits on the right of the decimal for the value found in variable "num"...

*/

System.out.printf("%.2f", num);

Here are few sample tests you can run to check if your program is working correctly:

Test Case #3

Enter the Average Wind Speed (in m/s): 5.0

Enter the Operating Efficiency [0...1]: 0.98

Enter the Blade Radius (in meters): 2.0

You entered an Average Wind Speed of 5.00 m/s.

You entered an Operating Efficiency of 0.98 (98.00%).

You entered a Blade Radius of 2.00 meters.

Test Case #4

Enter the Average Wind Speed (in m/s): 12.29

Enter the Operating Efficiency [0...1]: 0.10

Enter the Blade Radius (in meters): 3.0

You entered an Average Wind Speed of 12.29 m/s.

You entered an Operating Efficiency of 0.10 (10.00%).

You entered a Blade Radius of 3.00 meters.

Exercise #3: Now you are ready to perform the calculations. Add two double variable declarations to your code (one for maximum power, one for actual power) and use the aforementioned formulas to compute the wind turbine maximum power value. Remember that the actual power is the product of the maximum power and the operating efficiency. Store the results in your two variables. and add a System.out.printf statement to your code to display the contents of those variables. Here are few sample tests you can run to check if your program is working correctly:

Test Case #5

Enter the Average Wind Speed (in m/s): 5.0

Enter the Operating Efficiency [0...1]: 0.98

Enter the Blade Radius (in meters): 2.0

You entered an Average Wind Speed of 5.00 m/s.

You entered an Operating Efficiency of 0.98 (98.00%).

You entered a Blade Radius of 2.00 meters.


The Maximum Power is 942.48 W and the Actual Power is 923.63 W.

Test Case #6

Enter the Average Wind Speed (in m/s): 12.29

Enter the Operating Efficiency [0...1]: 0.10

Enter the Blade Radius (in meters): 3.0

You entered an Average Wind Speed of 12.29 m/s.

You entered an Operating Efficiency of 0.10 (10.00%).

You entered a Blade Radius of 3.00 meters.


The Maximum Power is 31491.93 W and the Actual Power is 3149.19 W.

NOTE: Write in Java language, all code must fit within 80 columns or less, and each line that ends with a semicolon must have a comment in descriptive English!

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Similar questions
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