Create a class line which consists of start and end


Please write in C++

Create a class Line which consists of start and end coordinates, and line type. The default values should be as follows: start coordinate is (0, 0), end coordinate is (0, 0). This class should support two types of lines which are vertical (v) and horizontal (h).

The default value for line type should be vertical. This class has set function which is used to set the start and end coordinates, and line type.

This function should verify that the line can be drawn using the start and end coordinates based on the line type. This class also has draw function which draws a line.

First of all, you need to implement a class Coordinate. Hint: You need to calculate the length of the line in order to draw.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Create a class line which consists of start and end
Reference No:- TGS02894643

Expected delivery within 24 Hours