Question: Suppose that a class named Direction has a toString method that returns an angle, for example, 9 0 degrees. Suppose that a class named

Suppose that a class named Direction has a toString method that returns an angle, for example, "90 degrees". Suppose that a class named Vector extends Direction and overrides its toString method to return more information, for example, "90 degrees and 50 meters".
If I instantiate a Vector like so:
Direction v = new Vector(90,50);
What will its toString return?
Question 22 options:
"90 degrees and 50 meters"
"90 degrees"

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 Programming Questions!