I'm trying to get access to a method that is outside of three classes that extend each other. Basically the three classes below are linked together by the extends.
class CheckedTime extends class PreciseTime extends class Time.
I have a third class LocalCall that extends an abstract class PhoneCall
I have two objects of CheckedTime(int, int, int) that make up my LocalCall(CheckedTime, CheckedTime) constructor. I have a method that needs to access a method in PreciseTime, but am receiving a NullPointerException since I can't determine how to call the particular method. Here's the line in my LocalCall class causing the exception.
callLength = endTime.toSeconds() - startTime.toSeconds();
How can I write this line to access my PreciseTime method from LocalCall? I've been stumped on this for 3 days.