Question: SOS ... help This is in Java Program # 1: SolarPanel.java Create a class called SolarPanel. The SolarPanel class should have 3 instance variables and

SOS ... help
This is in Java
 SOS ... help This is in Java Program # 1: SolarPanel.java
Create a class called SolarPanel. The SolarPanel class should have 3 instance

Program # 1: SolarPanel.java Create a class called SolarPanel. The SolarPanel class should have 3 instance variables and methods as follows: 1. private instance variables for openCircuitVoltage (double), nominalVoltage (int), and cellType (String). openCircuitVoltage is the maximum voltage available from a solar cell. Allowed o values for openCircuitVoltage are from 0.0 to 100.0. Default value is 40.0 o nominalVoltage is a category. Allowed values for nominalVoltage are 12 or 24 Default value is 12. o cellType can only be "Mono-crystalline" or "Poly-crystalline". No other values are allowed. Default value is "Mono-crystalline". (Check spelling carefully on these values. They are case-sensitive.) a default constructor that initializes openCircuitVoltage to 40.0, nominalVoltage to 12, and cellType to "Mono-crystalline. another constructor with 3 parameters for openCircuitVoltage, nominalVoltage, and cellType This constructor should pass the parameters, one-by-one, to the related mutators an accessor "get" method for each instance variable a mutator "set" method for each instance variable. Each mutator must perform "data validation" which means that the mutators must ensure that only allowed values are stored in the instance variables. If an invalid value is passed to a mutator, the mutator should change the instance variable to the default value. . . a toString method that returns a String containing a description of the SolarPanel. Example: "SolarPanel: Voc 100.0 V Nom 12 V cellType Poly-crystalline" Save and compile the class. Debug as needed before going on to the next program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!