mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
14 lines
289 B
Python
14 lines
289 B
Python
from abc import ABC, abstractmethod
|
|
|
|
|
|
class Figure(ABC):
|
|
@abstractmethod
|
|
def draw(self) -> None:
|
|
raise NotImplementedError
|
|
|
|
class Rectangle(Figure):
|
|
def __init__(self, x: int, y: int) -> None:
|
|
self.x = x
|
|
self.y = y
|
|
|
|
rec = Rectangle(5, 2) |