So here is a time for your next assignment and what they want to create is Alex, make write it for
you.
So your next assignment is to create a class that will draw and display different lines.
So create a class that will and control lines.
You also need to other constructor in this class.
So when you create a line, you have to specify it's lent origin X and Origin Y coordinates.
OK, so we will need two percent of constructor parameters which are going to be integers.
And you also need to have two methods drop in display.
So good luck with your exercise is quite easy.
So I'm giving you five to 10 minutes for this list of the video.
Try doing it yourself.
And if you cannot, then go back to the video because I will do it right now.
So now let's see how you can do this.
Let's create a class of a typed line.
Then we'll create a constructor, which is.
The.
In it, so what we need to pass here is Slint.
X and Y origin, right?
So this is what we need, ones who are creating the line object that is going to be created for our
class now wasn't done with that.
I all here self.
Dr. Land will be called to lend the self that X will be equal to X and self, not Y will be equal to
whites.
So that was the constructor then.
Let's create the two methods, display and draw.
So first of all, I would just pay to draw this right.
Deyrolle equals self and you say to print draw and that's it.
Then the next little bitty
display and then we'll print display.
Now let's create a line.
One will be equal to a line.
So here we're calling our class and then we'll pass the length of, let's say, five X and Y position
to the school.
We'll start from zero and then let's print line dot Leontes.
And also after that, I would like to call them.
So I want to line one dot draw.
OK, so let's see what is going to be displayed on our screens.
And as you can see here, we're displaying five for the length of the line and also for displaying drawing
because we were drawing our line and we use the drawing metal.