Write a class lines containing a static method dashedline


Question: Write a class Lines containing a static method dashedLine to draw dashed lines, so it can write:

Lines,dashedLine(g, xA, yA, xB, yB, dashLength);

where g is a variable of type Graphics, xA, yA, xB, yB are the device coordinates of the endpoints A and B, anddashLength is the desired length (in device coordinated) of a single dash. There should be a dash, not a gap, at each endpoint of a dashed line.

You have to implement a program to draw the dashed line method and provide the full code.

 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Write a class lines containing a static method dashedline
Reference No:- TGS0956286

Expected delivery within 24 Hours