Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 38.
- true
- 39.
- false
- 40.
- true
- 41.
- error
- 42.
- true
- 43.
- 20
- 44.
- 15
- 45.
- 2 4 3 6 5 4
- 46.
- 12345
- 47.
- --
- -XXX-
- -XXXXXX-
- 48a.
- 0
- 48b.
- 1
- 49b.
- 15
- page290
- -------
- 2a. T
- 2b. F
- 2c. T
- 2d. F
- 2e. T
- 2f. F
- 2g. F
- 2h. T
- 2i. T
- 3a.
- 13 21
- 3b.
- 5 6
- 3c.
- 6 6
- 3d.
- 7 11
- 9. The following code is poorly structured...rewrite it so it has a better structure and avoids redundancy...
- Scanner console = new Scanner(system.in);
- System.out.print("How much will John be spending? ");
- int numBills1 = (int) Math.ceil(console.nextDouble());
- System.out.println("How much will Jane be spending? ");
- int numBills2 = (int) Math.ceil(console.nextDouble());
- System.out.println("John needs " + amount + " bills");
- System.out.println("Jane needs " + amount + " bills");
- BOOLEAN EXPRESSIONS 2
- 26. F
- 27. F
- 28. F
- 29. F
- 30. F
- 31. F
- 32. ERROR
- 33. F (i think, problem got cut off)
- 34. not sure, got cut off
- 35. F (i think, may be cut off?)
- 38. Assuming the following code represents...
- If the file is not found, there is nothing printed. Add a catch block which prints to the user that there is an error.
- 37. The following method suffers from... (not sure what the fencepost problem is, but here's my guess)...
- static void fencePost(int start, int end){
- int sum = 0; //though this is never used in the program
- for(int i = start; i < end-1; i++){
- System.out.print(i);
- System.out.print(",");
- }
- System.out.println(end-1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement