You are on page 1of 3

ICS3U

Rm 411 — 1:25pm
Friday, June 16th, 2023

SECTION CONTENTS INSTRUCTIONS MARKS SCORE

I Multiple Choice Use 20


pencil/FRONT

II Labelling 9

III Matching Use pencil/BACK 15

IV Short Answer 9

V Programming 16

69
TOTAL

Review Computer Hardware Questions and Labelling Worksheets – These are


posted under Content > Computer Hardware on D2L website

Java Review Questions(Review tests, notes, handouts/assignments etc.)


(Chapters 2 – 4 in textbook)

1. List three features of every object-oriented programming language.


2. Describe the difference between source code and machine code.
3. What does JVM stand for?
4. What is byte code? Describe how the JVM uses byte code.
5. Explain the difference between a Java compiler and the Java VM.
6. What is the effect of the message println.
7. Describe how to use the System.out object.
8. Discuss the 3 major steps when writing and running a program in Java.
9. What are the 3 different types of errors in programs. Give examples of each.
10. What is a variable and how is it used?
11. What is a constant? How do you make one?
12. List 4 legal identifier(variable) names. List four illegal identifier(variable) names.
13. What is a Scanner object?
14. What are the different types of data types for a variable in Java?
15. What is casting? How is it done?
16. What is a package and/or library in Java. Give an example.
17. How do you make a random number?
18. What is the difference between primitive types vs. reference(abstract) types?
19. Explain the difference between a class and an object(instance of a class).
20. What are the different arithmetic operators?
21. What are the different relational operators?
22. Use a decision structure to write an appropriate statement for each of the
following:
a. Display Great job! When grade is 90 or higher
b. Display Error when number is less than 20 or greater than 50
c. Add 2 to the value of y when y is less than 100
23. Write a statement that uses Math.random( ) the will generate a random integer
between 20 and 100.
24. Write a statement that uses Math.random( ) the will generate a random double
between 10 and 20.
25. Given the following assignments, determine if each of the following expressions
evaluates to true or false:

size = 100 weight = 50 value = 75

a) size > 50 && weight == 50


b) value < 100 && !(weight == 50)
c) size >= 100 || value >= 100
d) weight < 50 || size > 50
e) !(value < 75)
f) !(size > 100 && weight > 50 && value > 75)
g) (value < 125 || weight < 76) && size == 100

26. What is a switch statement? How do you make one? What is the “break”
command used for?
27. What is a nested statement?
28. What are some of the common methods of the Math Class.

Review

● IF , IF-ELSE, IF- ELSE IF statements


● Look over all Chapter Vocabulary and Review Questions
● Review all submitted programs especially ones using a Scanner and using
Decision statements
● Edit/Compile/Execute (next page)
**BRING YOUR TEXTBOOK TO THE EXAM**

You might also like