Question: Use Java composition, inheritance and polymorphism Draw a UML diagram of your classes and write the classes, constructors and methods for these three classes to

Use Java composition, inheritance and polymorphism

Draw a UML diagram of your classes and write the classes, constructors and methods for these three classes to generate the output

Point origin = new Point (0,0);

System.out.println(orgin);

Point pt2 = new point 92,2);

Line one = new Line (1,1,2,2);

Line anotherOne = new Line (orgin, pt2);

System.out.println(one)

System.out.println(anotherOne);

visibleLine two = new VisibleLine(3,4,5,6,1, dashed);

system.out.println(two);

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!