public class Main {
public static int a;
public static int b = 12;
public Main(int a) {
this.a = a;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter a: ");
a = sc.nextInt();
Main m1 = new Main(a);
int p = (a + b) * 1 / 2;
System.out.println("искомое значение = " + p);
}
public int getA() {
return a;
}
public int getB() {
return b;
}
}
public class AreaTest {
@Test
public void positiveTriangleCheckTest() {
Main m1 = new Main(8, 6, 4);
int a = m1.getA();
int с = 18;
if (a >= с)
System.out.println("Проход открыт");
else
System.out.println("Проход закрыт");
}
}
public abstract class AbstractTest {
}