Question: Download the complete Caller ID program. Write a static method totalDurations that is passed the parallel arrays from the main program. It creates a new

 Download the complete Caller ID program. Write a static method totalDurations
that is passed the parallel arrays from the main program. It creates

Download the complete Caller ID program. Write a static method totalDurations that is passed the parallel arrays from the main program. It creates a new pair of parallel arrays (phone numbers and durations, again) where each different incoming phone number is stored exactly once, and the duration is the total duration of all the calls from that phone number. It then prints these arrays. Nothing is returned For example, if the arrays contain 555-1234 (duration 10), 555-4321 (duration 20), and 555-1234 (duration 30), then the output would show 555-1234 (duration 40) and 555-4321 (duration 20) To help you solve the problem, you can call the find method. Use it to check if a phone number has already been placed in the new arrays, and if so, to determine where that number is. Also note that the size of the new arrays will never be greater than the current list You will need to modify the main program to adequately test your new method. But you should submit only your totalDurations method for marking, by the due date specified in the course schedule

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