Question
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
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