Object Oriented Study Guide One You will have access to the api's that you will need to complete the following problems Online refer to the API at: http://download-llnw.oracle.com/javase/6/docs/api/ 1. Construct a Rectangle object and then compute and print its area. import java.awt.Rectangle; /** Constructs a Rectangle object and then computes and prints its area. */ public class AreaTester { public static void main(String[] args) { } } 2. Write a program that generates a toss of a die Constructor Summary Random() Creates a new random number generator. Method Summary int nextInt() Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence. int nextInt(int n) Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence. import java.util.Random; /** This program simulates the toss of a die. */ public class DieSimulator { public static void main(String[] args) { } } 4. Print your name inside a box /** Prints your name inside a box. */ public class NamePrinter { public static void main(String[] args) { } } 5. Compute the sum of the first ten positive integers, 1 + 2 + ... + 10. /** Computes the sum of the first ten positive integers, 1 + 2 + ... + 10. */ public class Sum10 { public static void main(String[] args) { } } 6. Give two examples of accessors for the Rectangle Class. 7.Look at the API documentation of the String class. Which method would you use to obtain the string "hello, world!" from the string "Hello, World!"? 8.What is the difference between local and instance variables? 9. What are parameters used for? 10.Suppose you are working in a company that produces personal finance software. You are asked to design and implement a class for representing bank accounts. Who will be the users of your class? 11. Given the following signature of a public interface public void deposit(double amount) for a BankAccount class. Describe what each term means. public void deposit double amount 12. How do compilers tell multiple constructors apart? 13. /** A cash register totals up sales and computes change due. */ public class CashRegister { double purchase; double payment; public CashRegister() { purchase = 0; payment = 0; } /** Records the sale of an item. */ public void recordPurchase(double amount) { double total = purchase + amount; purchase = total; } /** Enters the payment received from the customer. */ public void enterPayment(double amount) { payment = amount; } } In the above CashRegister class identify the constructor, the instance variables, the methods, the parameters and the return values. 14. Write a statement that sets the value of i to the number of characters in the following string: int i; String message = "Go home early today." 15. What does api stand for?