Question: The class must have these private instance variables: private int [ ] start, end The class must have the following public methods: public Line (

The class must have these private instance variables:
private int[] start, end
The class must have the following public methods:
public Line(int row, int col, boolean horizontal, int length)[this is the constructor]
Constructs a line starting at row, col that is horizontal if parameter horizontal is
true or vertical if the parameter is false; the length of the line is specified by the
last parameter (an int greater than 0). Notes: The parameters of this method
specify the row and column of the beginning of the line, but you must compute
the row and column of the end of the line. start[0] should be set to the row of the
beginning of the line and start[1] should be set to its column; end[0] should be set
to the row of the end of the line and end[1] should be set to its column.
 The class must have these private instance variables: private int[] start,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!