final jeopardy fundamen tal java numerical data type boolean expressi on if/then/ while miscellan...

51
Final Jeopardy Final Jeopardy Fundame Fundame ntal ntal Java Java Numerica Numerica l l Data Data type type Boolea Boolea n n Expres Expres sion sion If/ If/ THEN/ THEN/ WHILE WHILE Miscel Miscel laneou laneou s s 10 10 10 10 10 10 10 10 10 10 20 20 20 20 20 20 20 20 20 20 30 30 30 30 30 30 30 30 30 30 40 40 40 40 40 40 40 40 40 40 50 50 50 50 50 50 50 50 50 50

Upload: mitchell-patterson

Post on 21-Jan-2016

223 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Final JeopardyFinal JeopardyFundamFundam

ental ental JavaJava

NumericaNumericall

Data typeData type

Boolean Boolean

ExpressExpressionion

If/If/THEN/THEN/WHILEWHILE

MiscellaMiscellaneousneous

1010 1010 1010 1010 1010

2020 2020 2020 2020 2020

3030 3030 3030 3030 3030

4040 4040 4040 4040 4040

5050 5050 5050 5050 5050

Page 2: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Java fundamental for 10Java fundamental for 10

Q: How to compile and run a Java Q: How to compile and run a Java program?program?

OL 10 A

Page 3: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Java fundamental– 10 pointsJava fundamental– 10 points

A: What is Javac and Java?A: What is Javac and Java?

Table

Page 4: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Java fundamental for 20Java fundamental for 20

Q: A Java program contains one or Q: A Java program contains one or more of this?more of this?

OL 20 A

Page 5: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Java fundamental for 20Java fundamental for 20

A: What is CLASS?A: What is CLASS?

Table

Page 6: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Java fundamental for 30Java fundamental for 30

Q: This is needed to run the same Java program Q: This is needed to run the same Java program on different Operating Systems without having on different Operating Systems without having to recompile?to recompile?

OL 30 A

Page 7: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Java Fundamental for 30Java Fundamental for 30

A: What is Java Virtual Machine (JVM) ?A: What is Java Virtual Machine (JVM) ?

Table

Page 8: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Java fundamental for 40Java fundamental for 40

Q: The name of this tree has been Q: The name of this tree has been used as another name for Java ?used as another name for Java ?

OL 40 A

Page 9: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Java fundamental for 40Java fundamental for 40

A: What is “OAK”?A: What is “OAK”?

Table

Page 10: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Java fundamental for 50Java fundamental for 50

Q: This used to be the best selling point for Java Q: This used to be the best selling point for Java (hint: refer to its portability with 4 words) (hint: refer to its portability with 4 words)

OL 50 A

Page 11: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Java fundamental for 50Java fundamental for 50

A: What is “Write ONCE Run A: What is “Write ONCE Run EVERYWHERE”?EVERYWHERE”?

Table

Page 12: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Numerical Data type 10Numerical Data type 10

Q: Data types used to represent Q: Data types used to represent integer values?integer values?

CF 10 A

Page 13: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Numerical Data for 10Numerical Data for 10

A: What are byte, short, int, long?A: What are byte, short, int, long?

Table

Page 14: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Numerical Data for 20Numerical Data for 20

Q: Data types to represent real Q: Data types to represent real values.values.

CF 20 A

Page 15: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Numerical data types for 20Numerical data types for 20

A: What are float and double?A: What are float and double?

Table

Page 16: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Numerical data type for 30Numerical data type for 30

Q: These symbols are allowed in a Q: These symbols are allowed in a valid identifier?valid identifier?

CR 30 A

Page 17: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Numerical data type for 30Numerical data type for 30

A: What are $ and _?A: What are $ and _?

Table

Page 18: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Numerical Data type for 40Numerical Data type for 40

Q: Suppose we have:Q: Suppose we have:int x, y;int x, y;x = 40;x = 40;y = x / 6y = x / 6

What is the value of y?What is the value of y?

CF 40 A

Page 19: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Numerical Data for 40Numerical Data for 40

A: What is 6?A: What is 6?

Table

Page 20: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Numerical data for 50Numerical data for 50

Q: The values of this can not be Q: The values of this can not be changed in the entire program?changed in the entire program?

CF 50 A

Page 21: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Numerical data for 50Numerical data for 50

A: What is constant?A: What is constant?

Table

Page 22: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Boolean expression for 10Boolean expression for 10

Q: Boolean expressions are evaluated Q: Boolean expressions are evaluated to one of these values?to one of these values?

IS 10 A

Page 23: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Boolean expression for 10Boolean expression for 10

A: What is true or false?A: What is true or false?

Table

Page 24: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Boolean expression for 20Boolean expression for 20

Q: These are boolean operators in Q: These are boolean operators in Java?Java?

IS 20 A

Page 25: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Boolean Expression for 20Boolean Expression for 20

A: What are AND, OR, NOT?A: What are AND, OR, NOT?

Table

Page 26: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Boolean expression for 30Boolean expression for 30

Q: Which are the six relational operators Q: Which are the six relational operators used in boolean expressions?used in boolean expressions?

A.A. <<B.B. >=>=C.C. <=<=D.D. >>E.E. ====F.F. &&&&G.G. !=!=H.H. ! !

IS 30A

Page 27: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Boolean expression for 30Boolean expression for 30

A: What are A,B,C,D,E,and G?A: What are A,B,C,D,E,and G?

Table

Page 28: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Boolean Expression for 40Boolean Expression for 40

Q: Evaluate this boolean expression:Q: Evaluate this boolean expression:

(1<2 || 4 <=3)(1<2 || 4 <=3)

IF 40 A

Page 29: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Boolean expression for 40Boolean expression for 40

A: What is true?A: What is true?

Table

Page 30: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Boolean expression for 50Boolean expression for 50

Q:Q: Evaluate this expression:Evaluate this expression:

(60%3 == 0) && (50%9 != 0)(60%3 == 0) && (50%9 != 0)

IF 50 A

Page 31: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Boolean expression for 50Boolean expression for 50

A: What is true?A: What is true?

Table

Page 32: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

If/then/while/for for 10If/then/while/for for 10

Q: What is the output from the following code?.Q: What is the output from the following code?.int number = 45;int number = 45;if (number != 45) {if (number != 45) {

System.out.println(“Hello”);System.out.println(“Hello”);}}else {else {

System.out.println(“Bye”);System.out.println(“Bye”);}}

A. HelloA. Hello

B. ByeB. ByeT10 A

Page 33: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

If/Then/While for 10If/Then/While for 10

A: What is B?A: What is B?

Table

Page 34: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

If/Then/While for 20If/Then/While for 20

Q: What is the result of this switch statement: Q: What is the result of this switch statement: int number = 45;int number = 45;switch (number) {switch (number) {case 35: System.out.println(“Good”);case 35: System.out.println(“Good”);case 45: System.out.println(“Fair”);case 45: System.out.println(“Fair”);case 55: System.out.println(“None”);case 55: System.out.println(“None”);

}}A. GoodA. GoodB. FairB. FairC. NoneC. None

T20 A

Page 35: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

If/Then/While for 20If/Then/While for 20

A: What is Fair?A: What is Fair?

Table

Page 36: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

If/Then/While for 30If/Then/While for 30

Q: What is this code doing?Q: What is this code doing?

if (num1 * num2 * num3 < 0) {if (num1 * num2 * num3 < 0) {

System.out.println(“This is good”);System.out.println(“This is good”);

}}

else {else {

System.out.println(“This is bad”);System.out.println(“This is bad”);

}}T30 A

Page 37: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

If/Then/While for 30If/Then/While for 30A: What is “if products of these three A: What is “if products of these three

numbers (num1,num2,num3) are numbers (num1,num2,num3) are negative, print out “This is good”. negative, print out “This is good”. Otherwise, print out “This is bad” ?Otherwise, print out “This is bad” ?

Table

Page 38: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

If/Then/While for 40If/Then/While for 40

Q: These symbols are always found in Q: These symbols are always found in an if statementan if statement

T40 A

Page 39: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

If/Then/While for 40If/Then/While for 40

A: What are ( and )?A: What are ( and )?

Table

Page 40: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

T50 A

It/Then/While for 50It/Then/While for 50

Q: The statements in the body of this Q: The statements in the body of this loop must be executed at least ONCEloop must be executed at least ONCE

Page 41: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

If/Then/While for 50If/Then/While for 50

A: What is DO-WHILE loop?A: What is DO-WHILE loop?

Table

Page 42: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Miscellaneous for 10Miscellaneous for 10

Q: Switch only support these data Q: Switch only support these data types ?. types ?.

DM 10 A

Page 43: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Miscellaneous for 10Miscellaneous for 10

A: What are char and integer (byte, A: What are char and integer (byte, short, int)?short, int)?

Table

Page 44: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Miscellaneous for 20Miscellaneous for 20

Q: Operand is converted from a lower Q: Operand is converted from a lower to a higher precisionto a higher precision

DM 20 A

Page 45: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Miscellaneous for 20Miscellaneous for 20

A: What is implicit casting? A: What is implicit casting?

Table

Page 46: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Miscellaneous for 30Miscellaneous for 30

Q: How can we say 2Q: How can we say 233 in Java. in Java.

DM 30 A

Page 47: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Miscellaneous for 30Miscellaneous for 30

A: What is Math.pow(2,3) ?A: What is Math.pow(2,3) ?

Table

Page 48: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Miscellaneous for 40Miscellaneous for 40

Q: JOptionPane.showInputDialog gets Q: JOptionPane.showInputDialog gets input from a user and return this data input from a user and return this data typetype

DM 40 A

Page 49: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Miscellaneous for 40Miscellaneous for 40

A: What is String?A: What is String?

Table

Page 50: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Miscellaneous for 50Miscellaneous for 50

Q: The value of this component can be Q: The value of this component can be changed in a Java program changed in a Java program

DM 50 A

Page 51: Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50

Miscellaneous for 50Miscellaneous for 50

A: What is variable?A: What is variable?

Table