Skip to content

Drawing shapes on a 2D canvas with modern C++ and OOP.

Notifications You must be signed in to change notification settings

mierzejk/Shapes2D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Problem statement

You need to build an application that gives users a capability to draw shapes on a canvas and edit them.

Create an API (a set of classes and methods) to allow a UI developer to implement the UI for the application described below (you are not in charge of the UI).

  1. Add / remove shapes to / from canvas:
    • Rectangle
    • Circle
    • Triangle
  2. Shape attributes:
    • Size
    • Color
    • Position
  3. Each shape on canvas maybe selected or unselected:
    • Changing attribute(s) on the selected shape should have an immediate effect on the canvas.
    • The API can also batch requests for change before applying them to the canvas.

Please notice that shapes can’t overlap.

Data structures:
Your API and the UI share a 2D array of type int, which represents the drawing canvas (you are responsible to fill it and update it correctly).

About

Drawing shapes on a 2D canvas with modern C++ and OOP.

Topics

Resources

Stars

Watchers

Forks