/* CSC 15 Final Exam Study Guide : Sample solutions Exam format will be similar to the midterm and quizzes. The exam will be "naturally" cummulative, with emphasis on loops, including nested loops arrays strings functions, including functions on arrays class and objects You should study the material on the midterm exam as well. You'll have to implement a class like on the midterm, except I won't be writing out half of it for you - I will provide more general descriptions of what the class should be. What will not be covered: graphical user interfaces I/O (except System.out.println) HOWEVER, IT WILL COVER THE USE OF EXCEPTIONS Additional Practice Problems (sample solution availabe at review session) */ class funs { // 1. Write a function that takes an array of integers as a parameter // and print the contents of the array backwards. public void backwards(int[] A) { int i=A.length-1; while (i>=0) { System.out.print(A[i]); i--; } } // backwards /* 2. Write a function that determines if a string S contains a given character: public boolean instring(String s, char a) For example, instring("abc",'b') should return true and instring("abc",'d') should return false. */ public boolean instring(String s, char a) { boolean answer = false; // there exists relation int i=0; while (i