Upload
alyson-nicholson
View
224
Download
0
Embed Size (px)
Citation preview
ReviewNum1 {
Hardware, Binary, Java, BlueJ, Variables, Classes, Arithmetic,
Print Statements, Errors, Boolean Expressions,
Conditionals, Loops, Random Numbers, Scanner Input }
Rules: 30 second time limit.You must cycle through team players.Done once you put pen down with cap on.You may ask your team for help.You may look at the notes at any time.Disqualified if you copy an answer.
Disqualified = -2Wrong Answer = -1No Answer = 0Correct Answer = +1First Correct = +2
Ready?
Write the output of the following code:
System.out.print(“Review”);System.out.println(“Day”);
What is the base-10 representation of this
unsigned binary number?
1101
Write a while loop that would print this output:
0 1 2 3 4
In 3-bit unsigned, what is the largest possible value
we can represent?
What is the base-10 representation of this
binary number in sign and magnitude?
1000
What hardware component reads CDs, DVDs, and
Blurays?
How do we write the Java logical operator “AND”?
What binary complement system requires that you
flip all of the bits and then add one to map negative
numbers?
Write the output of the following code:
int x = 20;while (x <= 100) {
x = x + 5;}System.out.print(x);
What binary complement system requires that you flip all of the bits to map
negative numbers?
Write the output of the following code:
double y = 13.7;System.out.print(y < 11.3 + 2.5);
Fill in a value for X to make the expression TRUE
int x = _____;
if ( ( x > 5 ) && ( x != 6 ) ) {…
If you are missing a close curly brace “}” somewhere
in your code, what error will you get?
How do we write the Java relational operator “equal
to”?
What is the name of this Java arithmetic operator?
%
What is the base-10 representation of this
binary number in sign and magnitude?
1100
When you plug a USB drive into your computer, what part is it being plugged
into?
What symbols do we write in code to start writing a
comment?
What hardware component is the main printed circuit board in your computer?
What is the base-10 representation of this
unsigned binary number?
0110
Write a while loop that would print this output:
100500
How do we write the Java relational operator “not
equal to”?
What hardware component performs all of the arithmetic for your
computer?
Fill in the missing code to get user input from this scanner and store it into the integer x.
Scanner scan = new Scanner(System.in);int x = ______________________
What Java variable type stores decimal numbers?
What is the line of code that will import the user input scanner in Java?
List all possible random numbers that could be stored in the integer
myRand.
int myRand = rand.nextInt(4);
What hardware component stores permanent data without containing any
moving parts?
How many bytes are in one kilobyte? Hint: 210
In 4-bit unsigned, what is the largest possible value
we can represent?
Write the output of the following code:
System.out.println(“Test”);System.out.print(“Friday”);
Fill in a value for Y to make the expression FALSE
int y = _____;
if ( ( y < 5 ) || ( y > 6 ) ) {…
How do we write the Java logical operator “OR”?
Write the output of the following code:
System.out.println(“Study”);System.out.print(“Your”);System.out.println(“Notes”);
Fill in the missing code to get a random number from 0 to 999 from this generator and store it into the integer x.
Random rand = new Random();int x = ______________________
Write the output of the following code:
int y = 100;while (y >= 0) {
y = y – 100; System.out.print(y);}
In 4-bit using Two’s Complement, what is the
smallest possible value we can represent?
What is the best cooling system for your CPU?
Fill in the missing code to complete the initialization of the
scanner.
Scanner scan = new Scanner(______);
What hardware component stores permanent data on a
spinning disk?
What is the result of this unsigned binary addition?
0101 + 0111 = ____
What do we call it when a binary addition produces a
result that passes the greatest possible
representation that a number of bits could store?
What two things do you need to install on your
computer to start programming in Java?
What is the result of this unsigned binary addition?
0110 + 0011 = ____
What is the base-10 representation of this
binary number in sign and magnitude?
0111
Before executing any code, the code must first be
transformed into 0’s and 1’s, which is also known as?
Write the output of the following code:
System.out.print(“Fun”);System.out.println(“ ”);System.out.print(“Day”);
What hardware component stores data quickly but temporarily for loading
programs and data?
What is the result of this unsigned binary addition?
0110 + 0110 = ____
List FOUR output devices from a computer.
If you wanted to have many monitors plugged into your computer, you would need multiple of this component.
List FOUR input devices to a computer.
What hardware component changes AC electricity into
DC for your other components?
What does JDK stand for?
Write the output of the following code:
int x = 5;while (x > 0) {
x = x – 1;}System.out.print(x);
Write the output of the following code:
String player = “Bob”;
System.out.println(“player”);System.out.println(“Bob”);System.out.print(player);
What is the base-10 representation of this
unsigned binary number?
1011
What is the base-10 representation of this
binary number in sign and magnitude?
1011
What is the line of code that will import the
random number generator in Java?
What does PCB stand for in computer hardware?
What does IDE stand for?
What binary compliment system do almost all
computers and programming languages
use?
Write the output of the following code:
int x = 7;System.out.print(x != 7);
What binary compliment system requires an end-
around carry for additions to produce the correct
result?
What is your computer science teacher’s name?