Question: 1. (50 points) Develop two classes. TropicalStorm which is a subclass of Storm and Hurricane as a subclass of TropicalStorm. The class TropicalStorm defines these
>>>sl-TropicalStorm () >S1 Tropicalstorm(0, 0,1900, default) >>>s2-TropicalStorm (20,80,2007, Bob') >s2 TropicalStorm (20, 80 ,2007,Bob) >>S2.getName ) Bob' >>>s2.getYear () 2007 >>33-Hurricane () >>S3 Hurricane (, 0,1900, default,o) >>>print (s3) I am category 0 Hurricane named default. I have peak winds of 0 mph, peak rain fall of 0 inches per hour in the year 1900 >>> s4=Hurricane (12, 200, 2017,' Irma ' , 5) >>>34.getCategory () >>>4.getWindSpeed () 200 >>>print (s4) I am category 5 Hurricane named Irma. I have peak winds of 200 mph, peak rain f all of 12 inches per hour in the year 2017 >>>s5-TropicalStorm (20,20,2012, 'Tony') >>print (s5) I am Tropical Storm named Tony. I have peak winds of 20 mph, peak rain fall of 20 inches per hour in the year 2012
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
