This week, we honor the Earth Day. According to the US Government website, Earth Day "is a time to celebrate gains we have made and create new visions to accelerate environmental progress". In El Paso where winds are frequent, one way to honor Earth Day is to promote the use of wind turbines for generating electricity.
1-3. Let us start helping user of wind turbins.
4. When we defined our class in Problems 1-3, we did not include an important characteristic: the cost of a wind turbine. Define a subclass WindTurbineWithCost of the class WindTurbine which contains a new field: the turbine's cost in dollars. In the main method, define a new object corresponding to the turbine A whose cost is $6,000.00.
5. Write a method that, given an array of objects of type WondTurbineWithCost (defined in Problems 1-4), prints the specifications of the cheapest wind turbine from this array.
6. Let us save the data about wind turbines which is currently stored in an array of objects of type WindTurbine. Write a code that writes all this data into a file line by line, so that the data about each wind turbine is placed into a separate line. In some cases, the users who typed the values into an array may have made a mistake and entered height in feet instead of the height in meters. Use try-catch block to produce the meaningful error message when the height is 40 meters or larger.
7. To help promote the cause of wind turbines and renewable energy, a group of activists hacked into the oil companies computers and brought the oil production to a halt. Provide two arguments why activists may consider such behavior ethical, and two arguments why other people may consider this behavior unethical.