Unformatted text preview: In your main function, 1) Create 2 objects L1, L2 of this class 2) Let L1 call the default constructor while L2 call the parameterized constructor with values of your choice. 3) After that Print the coordinates of L1 & L2 using the print member function and also print the distances by calling the distance member function. 4) Finally Translate L2 with new translation values xt = 20, yt = 30 using the translate member function and print the new values of L2 using the print member function. Don’t forget to create 3 files where one file named “Line.h” will contain the Class Definition, the other file with the name “Line.cpp” will contain the Class Implementation and the third file named “Lab10.cpp” will contain the main function....
View Full Document
- Spring '09
- Object-Oriented Programming, Method, Subroutine, Mutator method