added lab11 ex1

This commit is contained in:
2024-11-04 12:54:46 +01:00
parent f37a8cd665
commit 475afc0db5
7 changed files with 89 additions and 0 deletions

View File

@ -0,0 +1,16 @@
package lab11_flyweight.ex1;
public class Brush implements DrawingTool {
private final Props props;
public Brush(Props props) {
this.props = props;
}
@Override
public void draw(String text) {
System.out.println("Drawing '" + text + "' in " + props.size + ", color:" + props.color);
}
public record Props(Size size, Color color) {}
}