Answer to Question #162617 in Java | JSP | JSF for aj

Question #162617

Create a class CIRCUIT with the following public attributes: total resistance, total voltage and total current. Assign proper variable type and name for each attribute. Total voltage must be static. (static double variablename)


1
Expert's answer
2021-02-10T10:31:45-0500
public class Current {

   
       static int total_Voltage;
       double total_Current;
       private double total_resistance=10;
       public static void setVoltageSource() {
           total_Voltage = 30;
       }

       public void getTotal_Current() {
           total_Current = total_Voltage / total_resistance;
           System.out.println(total_Current);

       }
       public String getTotalResistance() {
           return String.format("to resistance", total_resistance);
       }
       public void setTotal_Resistance(double total_resistance) {
           this.total_resistance = total_resistance;
       }
       
       public static void main(String[] args) {
           Current cu=new Current();
           cu.getTotal_Current();
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog