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 sunny El Paso, one way to honor Earth Day is to promote the use of solar panels for generating electricity.
1-3. Let us start helping user of solar panels.
4. When we defined our class in Problems 1-3, we did not include an important characteristic: the area of a solar panel. Define a subclass SolarPanelDetailed of the class SolarPanel which contains a new field: the panel's area in square meters. In the main method, define a new object corresponding to PW110 whose area is 1.0 square meter.
5. Write a method that, given an array of objects of type SolarPanel (defined in Problems 1-3), prints the specifications of the best solar panel from this array, i.e., the solar panel with the largest ratio of power per unit cost.
6. Friends from sunny Spain sent us a file containing data about Spanish-produced solar panels. Each line of this file contains the panel's area, power, and cost. Write a code that reads this information line by line and places this information into an array of objects of type SolarPanel. Use try-catch block to produce the meaningful error message when the power is 0 or negative.
7. To help promote the cause of solar panels, students scanned several papers and placed them on the web, including papers which are protected by copyrights. Is this ethical? Provide two arguments why students may consider this ethical, and two arguments why other people may consider these postings unethical.