Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package proj20012023;
- public class RunMain {
- public static void main(String[] args) {
- Circle c1;
- Circle c2;
- c1 = new Circle();
- c2 = new Circle(5, 9, 7);
- System.out.println("x = " + c1.getX());
- System.out.println("y = " + c1.getY());
- System.out.println("r = " + c1.getR());
- c1.setX(1);
- c1.setY(2);
- c1.setR(3);
- System.out.println("x = " + c1.getX());
- System.out.println("y = " + c1.getY());
- System.out.println("r = " + c1.getR());
- System.out.println(Math.max(c1.getR(), c2.getR()));
- System.out.println(" s = " + c1.getArea());
- System.out.println(" s = " + c2.getArea());
- c2.setArae(30);
- System.out.println("r2 = " + c2.getR());
- System.out.println(" s = " + c2.getArea());
- //c1.x=13;
- //c1.y=-5.5;
- //c1.r = -3;
- c1.setX(13);
- c1.setY(-5.5);
- c1.setR(-7);
- System.out.println("r1 = " + c1.getR());
- System.out.println(c1);
- System.out.println("*********************************************************");
- Triangle t1,t2;
- t1 = new Triangle(3,4,5);
- t2 = new Triangle(7);
- System.out.println("p = " + t2.getPerimeter());
- t2.setC(5);
- t2.setB(-5);
- System.out.println("p = " + t2.getPerimeter());
- System.out.println(t2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement