- `Drawable` contains the methods `draw` and `color`
- `Drawable` contains the methods `draw` and `color`
- `Displayable` contains the methods`display`.
- `Displayable` contains the method `display`.
- Define them in correspondence with the way they're called in the main function
- Define them in correspondence with the way they're called in the main function
@ -22,9 +22,10 @@
- Line: a new line should be created from references to two points also define an associated function called `random` that receives two argument the first is the maximum x value a point can have and the
- Line: a new line should be created from references to two points also define an associated function called `random` that receives two argument the first is the maximum x value a point can have and the
second the maximum y value that a point can have
second the maximum y value that a point can have
- Triangle: a new triangle should be created from references to three points
- Triangle: a new triangle should be created from references to three points
- Rectangle: a new rectangle should be created from two reference to points
- Rectangle: a new rectangle should be created from two references to points
- Circle: a new circle should be created from a point represented the center and a i32 value representing the radius
- Circle: a new circle should be created from a point representing the center and an i32 value representing the radius
- also define an associated function called `random` that receives two arguments the first is the maximum x value the center point can have and the second the maximum y value that the center point can have
- The main function also requires a definition of an associated function called `random` for the types Line, Point and Circle. You should derive their signature from the usage.
Don't forget to add the dependencies in your Cargo.toml.
Don't forget to add the dependencies in your Cargo.toml.