CSC 15: Problems to prepare for Quiz 2: (I've not yet decided whether to collect these problems) Quiz 2 will cover: How to call functions given a class interface (like on first quiz) Boolean operators &&, ||, and ! Type casting - when to use (double), (int), and what effect they have How to write simple functions, including boolean functions. 1. Given an object yourobject that has the following interface: void f(int x) int g() int h(int x, String y) Write statements showing how each method can be called on object yourobject. 2. Given three integers x, y, and z, write a (nested) if-else statement prints the largest of the three values. You may use boolean operators to avoid nesting. 3. One of the following statements have a problem. Identify it and explain. If that statement is eliminated, what will be the resulting values of x and y? int x; double y; x = 1; y = 3.5; y = x; y = (double) x; x = y; x = (int)y; 4. Percentages are sometimes represented with doubles between 0 and 1, e.g., 0.75 represents 75 percent. But percents can also be represented as integers between 0 and 100. Write a function that converts a double representation of percentage to the integer representation. That is, this function will take doubles such as 0.75, and return ints such as 75. 5. Write a boolean function "allsame" that determines if all three integers passed to it are the same. For example, allsame(3,3,3) should return true allsame(1,2,2) should return false.