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 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
Get step-by-step solutions from verified subject matter experts
