-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTest.java
41 lines (31 loc) · 857 Bytes
/
Test.java
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
import java.util.Scanner;
/**
* Extra test-only main method
* @author Burak Ozturk
* @version 05.11.2020
*/
public class Test
{
public static void main( String[] args)
{
Scanner scan = new Scanner( System.in);
// constants
// variables
Shape shep;
ShapeContainer box;
// program code
System.out.println( "Start...");
box = new ShapeContainer();
System.out.println( box.toString() );
shep = new Circle(4);
box.add(shep);
System.out.println( box.toString() );
shep = new Rectangle( 3, 4);
box.add(shep);
System.out.println( box.toString() );
shep = new Square( 16);
box.add(shep);
System.out.println( box.toString() );
System.out.println( "End.");
}
}