Vexus

Review questions

Sep 26th, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. Chance Sabo
  2. Review Questions Chp. 2
  3.  
  4. R2.1- A class is an object you can manipulate through code, while a class describes how to make a particular object.
  5. R2.2- A public interface states the method. The implementation allows us to implement it as many times as we need.
  6. R2.3- double price = 23.45
  7. 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.
  8. R2.4- mystery = 0
  9. R2.5- There’s a semicolon after each statement when there isn’t one needed.
  10. R2.6- In mathematics, the = sign means the total; sum. In java, it means equal to. Example
  11. 2+4=6 - mathematics
  12. Price = 26 – Java
  13. R2.7- int total = 30
  14. int total = total * 20
  15. R2.8- string up = penguinPajamas
  16. string upper = up toUpperCase
  17. string upper = PENGUINPAJAMAS
  18. R2.9- string hi = Hello
  19. string hi toLowerCase
  20. R2.10- An object is the thing being manipulated. The object variable are the specifications of the object.
  21. R2.11- newRectangle(5, 10, 15, 20);
  22. R = newRectangle(5, 10, 15, 20);
  23. getWidth r;
  24. getHeight r;
  25. R2.12- newRectangle(100, 100, 50, 50)
  26. R= newRectangle(100, 100, 50, 50)
  27.  
  28. public static void main(String[] args)
  29. System.out.println(“Hello, Dave”)
  30. R2.13 newRectangle(100, 100, 50, 50)
  31. R= newRectangle(100, 100, 50, 50)
  32. R2.14-
Advertisement
Add Comment
Please, Sign In to add comment