class Circuit{
private String operation;
private int number1, number2, output;
public Circuit (int n1, int n2) {number1=n1;number2=n2;}
public void setNumbers (int n1, int n2) {number=n1;number2=n2;}
public void setOperation(string op){operation=op;}
public void setN1(int n){number1 = n;}
public void setN2(int n){number2 = n;}
public void setOutput(int n){output = n;}
public String getOperation(){return operation;}
public int getN1(){return number1;}
public int getN2 () {return number2;}
public int getOutput(){return output;}
}
public class JavaApplication8 {
private static void printCircuit ( Circuit a )
{System.out.print(a. getOperation + a.getOutput);
public static void main (String [] args )
Circuit a1 = new Circuit(2,3); a1.setOperation("Subtraction"); a1.setOutput(a1.getN1()+a1.getN2()); printCircuit(a1); }
الخطأ هنا public static void main (String [] args )
اتمى احد يوضح لي او يدلني على موقع يفيدني بالتعلم والحلول
التعليقات