APCS Review sheet for exam on Bases, Java Arithmetic, and use of Math class methods. (ANSWERS INCLUDED) Part I. This will be a table of numbers to covert between base 10, base 2, base 8, and base 16. Use the homework and previous assignment as review. Part II. This will be several short problems of the type 5/8 = 0 0/8 = 0 10/7 = 1 2.0/4 = 0.5 (double) x /y IF x = 7 and y = 10 (double) x /y = 0.7 (double)( x/y) IF x = 7 and y = 10 (double) (x /y) = 0.0 10 % 3 = 1 5 % 10 = 5 0 % 10 = 0 Use the homework and previous assignment as review. Part II: Complete this class as practice Solution to APLine class: public class APLine { private int a, b, c; public APLine(int a1, int b1, int c1) { a = a1; b = b1; c = c1; } 1 public double getSlope() { return -(double)a / b; } public boolean isOnLine(int x, int y) { return a*x + b*y + c == 0; } } Part III: Complete the following class: Create a class to represent a ramp. Ramps should have the following field Rampline (APLine) Height ‐ double It should have 3 constructors: one default and two others with parameters of your choice. And the following methods: getRun ‐ returns double value of length of ramp Solution to Ramp class public class Ramp { private APLine rampLine; private double height; public Ramp() { rampLine = new APLine(5,4,‐17); height = 5.0; } public Ramp(APLine L, double h) { rampLine = L; height = h; } public Ramp(int a, int b, int c, double h) { rampLine = new APLine(a,b,c); height = h; } public double getRun() { } } return height/rampLine.getSlope();