This problem set covers material from Chapters 7.
It should be finished by Thurs. April 3 however you may submit it up until the
end of office hours on Thurs. April 24.
To submit a program, you need to demonstrate (during office hours or
class) your program and explain how it works. You may submit a
program multiple times.
General guidelines:
Write a static method which takes an array of ints as its argument, and reverses
the order of the elements in the array. That is, the first and last elements are switched,
the second and second last elements are switched, etc. For example, this method should change
the array [1, 2, 3, 4] to the array [4, 3, 2, 1].
Write a driver file to test your method. It should call your method with at least three
different inputs.
A version of the classAthlete, which we wrote in class, is available
here. Write a static method which takes an array of
Athletes as its argument, and returns the total number of medals won by all athletes stored
in the array. Change the package of Athlete.java if needed.
Write a driver file to test your method. It should call your method with at least three
different inputs.
Write a static method which takes a 2-dimensional array of type int, which
represents a matrix, as its argument, and returns true if the matrix is symmetric and false
otherwise. A matrix is symmetric if the entry at row i and column j is the same as the
entry at row j and column i for each i and j. The diagonal entries (i.e. entries with
the same row and column) can be any number.
Write a driver file to test your method. It should call your method with at least three
different inputs.
You should submit all problems for grading by the deadline (see class schedule for date). To submit a program, you need to demonstrate (during office hours or lab) your program and explain how it works.