added lab1 ex2
This commit is contained in:
		
							
								
								
									
										14
									
								
								src/lab1_decorator/ex2/Square.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								src/lab1_decorator/ex2/Square.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| package lab1_decorator.ex2; | ||||
|  | ||||
| public class Square extends Shape { | ||||
|     private double size; | ||||
|  | ||||
|     public Square(double size) { | ||||
|         this.size = size; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public void draw() { | ||||
|         System.out.println("Drawing a square"); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user