Computer Science Exam Outline
This final exam will take place on Wednesday June 18th in room 210. It will begin
at 8:30, you must be at the room by 8:15. To fully prepare for this exam you should
study and review all old tests and many of the notes we took in class. As
for the programming portion of the exam, only practise can prepare you for this.
If you programmed your CPT, you should be fine. Good luck. Please bring
with you several pencils, erasers, and some pen’s. It might be a good idea
to bring a ruler so you can draw straight lines. Good luck studying, see you on
Wednesday!
Here is the breakdown of the exam (15% of Final Mark)
PART A: KNOWLEDGE & UNDERSTANDING: 15 marks
PART B: APPLICATION: 5 marks
PART C: COMMUNICATION: 15 marks
PART D: THINKING & INQUIRY 40 marks
TOTAL: 100 marks
Part A: Consists of 15 Multiple choice, covers ideas about syntax, and the history
of programming, math in Java, order of operation, objects, etc..
Part B: Consists of: here is a program, tell me what it does. Or what is wrong with
this program? Also, I will give you a problem with missing parts and ask you to
add what is missing in the program so it will run? You might also be asked to fix
the errors in a program so the program will run?
Part C: Consists of short answer based questions. Topics covered: Objects,
Arrays, Documentation, when would you use a certain programming concept
(loops, if’s etc..).
Part D: is a choice of 2 programs. At the computer you will complete one of these
two programs. Include a Flow chart, Pseudo-Code and IPO diagram for the
program that you choose. Be sure to include comments, a header, and use proper
programming style. You will of course have access to all of your programs that
you have made during the semester but NO ACCESS to the internet!!
If I was to study, I would make sure that I have completed
all the programs that I have assigned. I would re-do all of
the old tests, quizzes, etc. I would then read over my notes
on Assignment statements, objects, Variables, etc.
Here are some example type questions that would be similar to a question on the exam.
Examine the following section of code:
String strA = new String("Roasted ");
String strB = new String("Acorns ");
strA = strB;
How many objects have been created? After the last statement has executed, how many objects
are now accessible (don't count garbage)?
a. created: 0 now accessible: 0 b. created: 2 now accessible: 1
c. created: 2 now accessible: 2 d. created:1 now accessible: 1
Examine the following section of code:
String strA = new String("Roasted ");
String strB = strA;
String strC = strA;
String strD = strA;
String strE = strA;
How many objects (total) are created? After the last statement has executed, how many objects
are now accessible (don't count garbage)?
a. This section of code is incorrect. b. created: 5 now accessible: 5
c. created: 1 now accessible: 1 d. created: 5 now accessible: 1
What is the value of the following expression: (2 - 6) / 2 + 9
a. 7 b. 8 c. 9 d. 10
What is the result of evaluating the following expression? -32 / 6
a. -2 b. -5 c. -5.3333 d. 6
What is the value of -32 % 6
a. 5 b. -5 c. 2 d. -2
Examine the following program, which reads input in from the keyboard of type double and then
squares the input and displays the answer (type double) to the monitor. Write in the missing
parts to make the program work.
import
class Echo
{
public static void main (String[] args)
{
double number = 0.0;
double answer = 0.0;
[Link]("Enter any number and I will print out the number squared");
[Link]("You entered: " + number+” and the number squared is “+answer );
}
}