Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Chance Sabo
- Review Questions Chp. 2
- R2.1- A class is an object you can manipulate through code, while a class describes how to make a particular object.
- R2.2- A public interface states the method. The implementation allows us to implement it as many times as we need.
- R2.3- double price = 23.45
- For a lovely pair of mittens that will keep your hands warm forever because you can’t take off the mittens and eventually they will burn your hands off in eternal hellfire.
- R2.4- mystery = 0
- R2.5- There’s a semicolon after each statement when there isn’t one needed.
- R2.6- In mathematics, the = sign means the total; sum. In java, it means equal to. Example
- 2+4=6 - mathematics
- Price = 26 – Java
- R2.7- int total = 30
- int total = total * 20
- R2.8- string up = penguinPajamas
- string upper = up toUpperCase
- string upper = PENGUINPAJAMAS
- R2.9- string hi = Hello
- string hi toLowerCase
- R2.10- An object is the thing being manipulated. The object variable are the specifications of the object.
- R2.11- newRectangle(5, 10, 15, 20);
- R = newRectangle(5, 10, 15, 20);
- getWidth r;
- getHeight r;
- R2.12- newRectangle(100, 100, 50, 50)
- R= newRectangle(100, 100, 50, 50)
- public static void main(String[] args)
- System.out.println(“Hello, Dave”)
- R2.13 newRectangle(100, 100, 50, 50)
- R= newRectangle(100, 100, 50, 50)
- R2.14-
Advertisement
Add Comment
Please, Sign In to add comment