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 Lineint row, int col, boolean horizontal, int lengththis 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 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 should be set to the row of the
beginning of the line and start should be set to its column; end should be set
to the row of the end of the line and end should be set to its column.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
