Question: Activity 3: Design a class Point with two data members x-cord and y-cord. This class should have an arguments constructor, setters, getters and a display

 Activity 3: Design a class Point with two data members x-cord

Activity 3: Design a class Point with two data members x-cord and y-cord. This class should have an arguments constructor, setters, getters and a display function. Now create another class "Line", which contains two Points "startPoint" and "endPoint". It should have a function that finds the length of the line Hint: formula is: sqrt((X2%), + (y-y)2) Create two line objects in runner and display the length of each line

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!