Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Wind speed often is measured in kilometer per hours (km/h) orknots (nautic miles). Another measure is the Beaufort scaleconsisting of integer numbers from 1 to

Wind speed often is measured in kilometer per hours (km/h) orknots (nautic miles). Another measure is the Beaufort scaleconsisting of integer numbers from 1 to 12. Design and implement aJava class, for creating wind speeds. Implement a constructor tocreate wind speed for a given velocity in kilometers perhour.(2pts) The class must contain methods for getting the speed asknots or on the Beaufort scale. Furthermore, it must be possible tocheck whether the wind is calm or a European windstorm (Orcan).(4pts) Wind speeds less than 2 km/h are calm. More than 120 km/h isa European windstorm. A nautic mile is 1,852 Kilometer. TheBeaufort scale is defined by B = (v/3.01)2/3, with v as the windvelocity in km/h. The Beaufort value B is rounded to the nearestinteger. There are no Beaufort values larger than 12. Write a classWindSpeedTester that takes wind speed as from user. Creates aWindSpeed object and sets the value of windSpeed throughconstructor. Prints the different windstorm speeds by calling themethods of WinfStorm class.(4pts) Hint: You can calculate ab withMath.pow(a,b). The skeleton for

WindSpeed.java file is provided.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Performance Engineering 10th European Workshop Epew 2013 Venice Italy September 17 2013 Proceedings

Authors: Maria Simonetta Balsamo ,William Knottenbelt ,Andrea Marin

2013 Edition

3642407242, 978-3642407246

More Books

Students also viewed these Programming questions