1 / 51

10 pt

Chapter 1. Chapter 2. Chapter 3. Code Gone Wrong. Random. 5 pt. 5 pt. 5 pt. 5 pt. 5 pt. 10 pt. 10 pt. 10 pt. 10 pt. 10 pt. 15 pt. 15 pt. 15 pt. 15 pt. 15 pt. 20 pt. 20 pt. 20 pt. 20 pt. 20 pt. 25 pt. 25 pt. 25 pt. 25 pt. 25 pt.

varden
Download Presentation

10 pt

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 1 Chapter 2 Chapter 3 Code Gone Wrong Random 5 pt 5 pt 5 pt 5 pt 5 pt 10 pt 10 pt 10 pt 10 pt 10 pt 15 pt 15 pt 15 pt 15 pt 15 pt 20 pt 20 pt 20 pt 20 pt 20 pt 25 pt 25 pt 25 pt 25 pt 25 pt

  2. What is the difference between Application and System Software? Give one example of each.

  3. System: supports basic operationsexamples: operating system, compilerApplication: accomplish specialized tasksexamples: word processor, spreadsheet, etc

  4. Convert to base 10:0011 1001

  5. 57

  6. What is the difference between ASCII and Unicode?

  7. ASCII = 1 byte per characterUnicode = 2 bytes per character

  8. Which is oldest?(i) Assembly Language(ii) High-Level Language(iii) Machine Language

  9. Machine Language

  10. Name the stages of the Software Development Life Cycle (in order)

  11. 1) Customer Request2) Analysis3) Design4) Implementation5) Integration6) Maintenance

  12. What is the JVM, and what does it do?

  13. Java Virtual Machine.It acts as an interpreter for the machine.

  14. What is source code?What is byte code?What are their extensions?

  15. Source Code: file written by programmer (.java extension)Byte Code: created by compiler (.class extension)

  16. Give an example of “storage” and an example of “memory”

  17. Storage: hard drive, floppy, cd-rom, etc.Memory: RAM, ROM

  18. Name three primitive data types.

  19. int, double, boolean

  20. Declare and instantiate an object of class KeyboardReader.

  21. KeyboardReader reader = new KeyboardReader();

  22. Declare three integer variables (a,b,c) in a single declaration and initialize b to 4.

  23. int a, b=4, c;

  24. What is wrong with this code? How can you fix it?int inches;inches = reader.readInt();double feet = inches/12;

  25. int/int = intFixed with casting

  26. String x = “number “ + 3 + 4;String y = “number “ + 3 * 4;String z = “number “ + (3 + 4);

  27. x = “number 34”y = “number 12”z = “number 7”

  28. What is the value of s2?int x = 8, y=10;String s1 = “hey”;x = x + y;String s2;s2 = x + y + s1 + x + y;

  29. 28hey1810

  30. double z = 9.0; int x=4, y=13;double a, b, c;a = y / x * z;b = (double) (y / x) * z;c = y % x / 3;

  31. a = 27.0b = 27.0c = 0.0

  32. Find the Syntax Errorint x = 20, y = 15, z;double u=2.1, v=33.3;z = x/y;u = x;z = (int)(u/v);w = u + v;u = x/y*u*v;

  33. w is not declared

  34. Find the Syntax Error:int a=5, b=10, c=2;double d=2.2, e=33.1;String s=“bob”;a = a/b;d = a/b;b = c/b + e;s = a + s + e;

  35. b = c/b + e;double assigned to int

  36. Find the Syntax Error:String one = “you”;String two = “smell”;String three = “funny”;String four;four = one + two + three;four = “four”+“four”+four;four =one + two + three + too!;four = two;

  37. four =one + two + three + too!;String literal not in quotes!!!

  38. Find the Syntax Error:int x =5, y=10, z;double a=1.2, b=2, c=4.1;a = x/y;x = (int)c / b + y;a = (double)(x/y);c = c + y;z = (int)c / x;

  39. x = (int)c / b + y;Assigning double into int variable!

  40. Find the Syntax Error:int x =5, y=10, z;double a=1.2, b=2, c=4.1;a = x/y;x = (int)(c / b) + y;a = (double)(x/y);c = c + z;z = (int)c / x;

  41. c = c + z;z has not been initialized

  42. double x =(double) (1/4) * 4;System.out.println(x);

  43. 0.0

  44. Convert to Base 101000 1111

  45. 143

  46. String blah = “I”;String blah2 = “Can”;String blah3 = “Program”;blah = blah + blah2;blah2 = blah;System.out.println(blah + “\n” + blah3 + “\n” + blah2 );

  47. ICanProgramICan

  48. Convert from hexadecimal to base 10:59AF

  49. 22959

  50. Which of the following expressions does NOT evaluate to 0.4?(A)   (int)4.5 / (double)10;(B)   (double)(4/10);(C)   4.0 / 10.0;(D)   4 / 10.0;(E)    (double)4 / (double)10;

More Related