-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestclasses.java
More file actions
84 lines (57 loc) · 1.94 KB
/
Testclasses.java
File metadata and controls
84 lines (57 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import Interface_abstract.*;
import Interface_abstract.Car;
import classes.*;
import classes.Student;
import Interface_abstract.Circle;
public class Testclasses {
public static void main(String[] args) {
Kvadrattenliy kv = new Kvadrattenliy();
kv.getD(1, 3, -2);
Greet g = new Greet();
g.greet("Famil");
Student s = new Student("Famil",18);
s.display();
Book constructor1 = new Book("Journey of guys", "Newson Mathews");
Book constructor2 = new Book("Journey of girls", "Newson Mathews");
constructor1.printBooks();
constructor2.printBooks();
Counter counter = new Counter();
counter.getCount();
Person person = new Person("Famil", 18);
Person person2 = new Person("Emil", 19);
person2.display();
person.display();
Circle circle = new Circle(3);
circle.calculateArea();
circle.calculatePerimeter();
Triangle triangle = new Triangle(3,3,3);
triangle.calculateArea();
triangle.calculatePerimeter();
Rectangle rectangle = new Rectangle(3,3);
rectangle.calculateArea();
rectangle.calculatePerimeter();
Shape[] figures = {rectangle,circle,triangle};
for (Shape figure : figures) {
figure.calculateArea();
figure.calculatePerimeter();
}
CreditCardPayment ccp = new CreditCardPayment();
ccp.pay(20);
PayPalPayment ppp = new PayPalPayment();
ppp.pay(30);
CashPayment cash = new CashPayment();
cash.pay(40);
Cat kotik = new Cat();
kotik.makeSound();
Dog dog = new Dog();
dog.makeSound();
Cow cow = new Cow();
cow.makeSound();
Car car = new Car();
car.move();
Airplane airplane = new Airplane();
airplane.move();
Bicycle bicycle = new Bicycle();
bicycle.move();
}
}