23
Computer Science Jeopardy 100 200 300 400 500 100 200 300 400 500 100 200 300 400 500 100 200 300 400 500 Vocabulary Method categories Writing Methods Hodgepodge Final Jeopardy

Science jeopardy

Embed Size (px)

Citation preview

Page 1: Science jeopardy

Computer Science Jeopardy

100

200

300

400

500

100

200

300

400

500

100

200

300

400

500

100

200

300

400

500

Vocabulary Method categories

Writing Methods Hodgepodge

Final Jeopardy

Page 2: Science jeopardy

Help

(1) Save a duplicate of this template.

(2) Enter all answers and questions in the normal view. (view/normal)

(3) Change the category headings in the normal view (view/normal)

(4) View as a slideshow.

(5) Use the home red button after each question.

©Norman Herr, 2003

Page 3: Science jeopardy

QuestionAnswer

Vocabulary-100

• ANSWER: The values within the parentheses• QUESTION: What are parameters?

Page 4: Science jeopardy

QuestionAnswer

Vocabulary-200

• ANSWER: This indicates what type of data will be sent back from a method

• QUESTION: What is the return type?

Page 5: Science jeopardy

QuestionAnswer

Vocabulary-300

• ANSWER: To execute a method, you must do this

• QUESTION: What is call the method (invoke the method)?

Page 6: Science jeopardy

QuestionAnswer

Vocabulary-400

• ANSWER: This segment of code is written in the class to define how the method will do its job

• QUESTION: What is the method definition?

Page 7: Science jeopardy

QuestionAnswer

Vocabulary-500

• ANSWER: This keyword must be included in class methods. It prevents us from making a copy (an object) of the class.

• QUESTION: What is static?

Page 8: Science jeopardy

QuestionAnswer

• ANSWER: This type of method is called using the object name

• QUESTION: What is an object method?

Method Categories-100

Page 9: Science jeopardy

QuestionAnswer

Method Categories-200

• ANSWER: This type of method is called using the class name

• QUESTION: What is a class method?

Page 10: Science jeopardy

QuestionAnswer

Method Categories-300

• ANSWER: This type of method does not send data back to the main method

• QUESTION: What is a void method?

Page 11: Science jeopardy

QuestionAnswer

Method Categories-400

• ANSWER: This type of method sends back data to the main method

• QUESTION: What is a return method?

Page 12: Science jeopardy

QuestionAnswer

Method Categories-500

• ANSWER: This type of method has no information between its parentheses

• QUESTION: What is a no-parameter method?

Page 13: Science jeopardy

QuestionAnswer

Writing Methods-100

• ANSWER: A method must contain this keyword to indicate that it is not sending back data.

• QUESTION: What is void?

Page 14: Science jeopardy

QuestionAnswer

Writing Methods-200

• ANSWER: A method must contain these two keywords to indicate that it is sending back data.

• QUESTION: What is a data type and return?

Page 15: Science jeopardy

QuestionAnswer

Writing Methods-300

• ANSWER: A void method has this many parameters.

• QUESTION: What is unlimited?

Page 16: Science jeopardy

QuestionAnswer

Writing Methods-400

• ANSWER: Find the error in this method definition. public static double calcTax (int amount){ System.out.println(.0825 * amount);}

• QUESTION: What is either the wrong return type (should be void), or missing a return statement?

Page 17: Science jeopardy

QuestionAnswer

Writing Methods-500

• ANSWER: Find the error in this method heading. public static void add (int num1, num2)

• QUESTION: What is a missing data type before num2?

Page 18: Science jeopardy

QuestionAnswer

Hodgepodge-100

• ANSWER: A method is defined here

• QUESTION: What is inside a class?

Page 19: Science jeopardy

QuestionAnswer

Hodgepodge-200

• ANSWER: You may have this many public classes in each Java file.

• QUESTION: What is one?

Page 20: Science jeopardy

QuestionAnswer

Hodgepodge-300

• ANSWER: If only one class is in a file, this keyword should be added before the class.

• QUESTION: What is public?

Page 21: Science jeopardy

QuestionAnswer

Hodgepodge-400

• ANSWER: You call a method from main. After the method definition is finished, this happens to any variables declared in the method definition.

• QUESTION: What is they are deallocated/destroyed?

Page 22: Science jeopardy

QuestionAnswer

Hodgepodge-500

• ANSWER: Name the 3 important rules for using parameters.

• QUESTION: What are same quantity, same type, same sequence?

Page 23: Science jeopardy

QuestionAnswer

FINAL JEOPARDY• ANSWER: Write the method definition

that would appear in a class for a method named total that receives two integers, adds them together, and returns their sum.

• QUESTION: What ispublic static int total (int n1, int n2){ return n1 + n2;}