repeatedSequence

Category: Arrays
Author: Helene Martin and Marty Stepp
Book Chapter: 7.2
Problem: repeatedSequence
Write a static method named repeatedSequence that accepts two arrays of integers a1 and a2 as parameters and
returns true if a2 is composed entirely of repetitions of a1 and false otherwise. For example, if a1 stores the
elements {2, 1, 3} and a2 stores the elements {2, 1, 3, 2, 1, 3, 2, 1, 3}, the method would return
true.
If the length of a2 is not a multiple of the length of a1, your method should return false. You may assume that both
arrays passed to your method will have a length of at least 1.
The following table shows some calls to your method and their expected results: