Upload
fijiflip
View
384
Download
0
Tags:
Embed Size (px)
Citation preview
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
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
QuestionAnswer
Vocabulary-100
• ANSWER: The values within the parentheses• QUESTION: What are parameters?
QuestionAnswer
Vocabulary-200
• ANSWER: This indicates what type of data will be sent back from a method
• QUESTION: What is the return type?
QuestionAnswer
Vocabulary-300
• ANSWER: To execute a method, you must do this
• QUESTION: What is call the method (invoke the method)?
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?
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?
QuestionAnswer
• ANSWER: This type of method is called using the object name
• QUESTION: What is an object method?
Method Categories-100
QuestionAnswer
Method Categories-200
• ANSWER: This type of method is called using the class name
• QUESTION: What is a class method?
QuestionAnswer
Method Categories-300
• ANSWER: This type of method does not send data back to the main method
• QUESTION: What is a void method?
QuestionAnswer
Method Categories-400
• ANSWER: This type of method sends back data to the main method
• QUESTION: What is a return method?
QuestionAnswer
Method Categories-500
• ANSWER: This type of method has no information between its parentheses
• QUESTION: What is a no-parameter method?
QuestionAnswer
Writing Methods-100
• ANSWER: A method must contain this keyword to indicate that it is not sending back data.
• QUESTION: What is void?
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?
QuestionAnswer
Writing Methods-300
• ANSWER: A void method has this many parameters.
• QUESTION: What is unlimited?
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?
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?
QuestionAnswer
Hodgepodge-100
• ANSWER: A method is defined here
• QUESTION: What is inside a class?
QuestionAnswer
Hodgepodge-200
• ANSWER: You may have this many public classes in each Java file.
• QUESTION: What is one?
QuestionAnswer
Hodgepodge-300
• ANSWER: If only one class is in a file, this keyword should be added before the class.
• QUESTION: What is public?
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?
QuestionAnswer
Hodgepodge-500
• ANSWER: Name the 3 important rules for using parameters.
• QUESTION: What are same quantity, same type, same sequence?
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;}