Question: 4) Write a code snippet for a Line class. This class should contain a float data member, a parametrized constructor, a setLength() method for setting

4) Write a code snippet for a Line class. This class should contain a float data member, a parametrized constructor, a setLength() method for setting the length of the line, and a getLength() method that returns the length of the line [6 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
