AP CSA 5.4 / 5.5 (Getters / Setters)

Quiz
•
Computers
•
10th - 12th Grade
•
Medium
Herman Galioulline
Used 17+ times
FREE Resource
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The return type for the isOlderThan5 method should be void.
The return type for the isOlderThan5 method should be String.
The return type for the isOlderThan5 method should be int.
The isOlderThan5 method is missing a return statement for the case when age is less than or equal to 5.
The isOlderThan5 method should receive the variable age as a parameter.
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The class is missing a mutator method.
The class is missing an accessor method.
The accessor method is missing a return type.
The accessor method returns a variable other than an instance variable.
The instance variables should be designated public instead of private.
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
The getH method should have a double parameter.
The getH method should have an int parameter.
The getH method should return newH instead of h.
The getH method should have a return type of int.
The getH method should have a return type of void.
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
In line 10, the appendIt method should be declared as return type String.
Line 12 should be changed to str = s + str;.
Line 12 should be changed to str = str + s;.
Line 12 should be changed to return s + str;.
Line 12 should be changed to return str + s;.
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
In line 14, levelUp should be declared as type void.
In line 14, amount should be declared as type void.
Line 16 should be changed to strength + amount;.
Line 16 should be changed to return strength + amount;.
Line 16 should be changed to return amount;.
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
In lines 14 and 18, change < to >.
In lines 14 and 18, change < to <=.
In line 16, change score1 to num1 and in line 18, change score2 to num2.
In line 18, change else if to if.
In line 18, change else if to else.
Similar Resources on Quizizz
10 questions
Session 1

Quiz
•
9th - 12th Grade
10 questions
KS3 GCSE Computer Science (Programming / Python)

Quiz
•
7th - 11th Grade
10 questions
Unit Terms 2.3 -2.10

Quiz
•
12th Grade
8 questions
PYTHON

Quiz
•
12th Grade
10 questions
System Life Cycle

Quiz
•
10th - 11th Grade
10 questions
PCEP Section 1E: Perform Input/Output console operations

Quiz
•
12th Grade
10 questions
Java Code Tracing Practice A

Quiz
•
9th - 12th Grade
10 questions
Программирование C#

Quiz
•
1st - 10th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University