Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace DrawingTool
- {
- using System;
- public class CorDraw
- {
- public void Draw()
- {
- string figureType = Console.ReadLine();
- Figure figure = default(Figure);
- int firstSide = int.Parse(Console.ReadLine());
- if (figureType == "Square")
- {
- figure = new Square(firstSide);
- }
- else
- {
- int secondSide = int.Parse(Console.ReadLine());
- figure = new Rectangle(firstSide, secondSide);
- }
- figure.Draw();
- }
- }
- }
Add Comment
Please, Sign In to add comment