Jeron D.

asked • 04/29/16

Function calling using the accessor and mutator methods.

Class Name: Equilateral, Square, Triangle
Member Variables: sides, length
 
Square has a public member function, double get() const, that calls the accessor function of length from Equilateral.
 
Square has a public member function, void set(double), that calls the mutator function from Equilateral
 
Square has a public member function, double area() const, that returns length times length
 
Note: The length variable is private. Square and Triangle are derived classes from the Equilateral Class.

1 Expert Answer

By:

Alex H. answered • 12/21/24

Tutor
5 (7)

Software Engineer with a BS in Computer Science

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.