1. Engineering
  2. Computer Science
  3. 50 points develop two classes tropicalstorm which is a subclass...

Question: 50 points develop two classes tropicalstorm which is a subclass...

Question details

(50 points) Develop two classes. TropicalStorm which is a subclass of Storm and Hurricane as a subclass of TropicalStorm. 2. The class TropicalStorm defines these methods: a. An overloaded constructor init_0 which takes all the properties of a TropicalStom in addition to a name of the storm. b. getName - retrieves the name of the storm c. setName - sets the name of the storm The class Hurricane defines two methods: a. An overloaded constructor init Othat takes the hurricanes category in addition to all the other properties of Storm and TropicalStorm. It should set the category of the Hurricane (0-5), which is an instance variable in the Hurricane class, to the specified parameter but should call the constructor for the TropicalStorm class to set the other attributes. If category is less than 0 the category is 0 and if it is greater than 5 then it should be set to 5. Default is 0 b. getCategory) which returns the category of the Hurricane. c. setCategory0 which sets the category of the Hurricane.
media%2F5f6%2F5f6bd316-b863-44d0-b4ff-fa
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution