AP CSA Unit 2 Practise MCQ
Quiz
•
Computers
•
11th Grade
•
Easy
Avacado Tomato
Used 4+ times
FREE Resource
21 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
A student has created a Cat class. The class contains variables to represent the following.
A String variable called color to represent the color of the cat
A String variable called breed to represent the breed of the cat
An int variable called age to represent the age of the cat
The object myCat will be declared as type Cat. Which of the following descriptions is accurate?
An attribute of breed is String.
color, breed, and age are instances of the Cat class.
Cat is an instance of the myCat class.
age is an attribute of the myCat object.
An attribute of Cat is myCat.
Check MeCompare me
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A student has created a Movie class. The class contains variables to represent the following.
A String variable called title to represent the title of the movie
A String variable called director to represent the director of the movie
A double variable called rating to represent the rating of the movie
The object scaryMovie will be declared as type Movie. Which of the following descriptions is accurate?
An attribute of the scaryMovie class is title.
scaryMovie is an instance of the Movie class.
Title, director, and rating are instances of the scaryMovie object.
An attribute of the Movie instance is scaryMovie
Movie is an instance of scaryMovie.
Check MeCompare me
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following code segments will correctly create an instance of a Person object?
new Person john = Person("John", 16);
Person john("John", 16);
Person john = ("John", 16);
Person john = new Person("John", 16);
Person john = new Person(16, "John");
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of len after the following executes?
2
10
11
8
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of pos after the following code executes?
-1
3
5
4
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of s1 after the following code executes?
Hey
he
H
h
7.
MULTIPLE CHOICE QUESTION
1 min • 5 pts
Consider the following class. Which of the following code segments would successfully create a new Movie object?
Movie four = new Movie("My Cool Movie", "Steven Spielburg", "4.4");
Movie one = new Movie("Harry Potter", "Bob");
Movie two = new Movie("Sponge Bob");
Movie three = new Movie(title, rating, director);
Movie five = new Movie(t);
Answer explanation
The first movie is ignored since there is a second movie method which supersedes the first
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
16 questions
Principles of Information Technology
Quiz
•
9th Grade - University
18 questions
SEMI-Grier Unit 3.01-3.03
Quiz
•
9th - 12th Grade
20 questions
Key Applications 2
Quiz
•
9th - 12th Grade
20 questions
Twisted Pair Cables
Quiz
•
11th - 12th Grade
16 questions
1.1.7 - Units of Measurement
Quiz
•
11th - 12th Grade
20 questions
Spreadsheet Overview (Basic)
Quiz
•
9th - 11th Grade
19 questions
Unit 1 Digital Information Review
Quiz
•
9th - 12th Grade
20 questions
Latihan soal flash
Quiz
•
11th Grade
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Computers
20 questions
Halloween movies trivia
Quiz
•
7th - 12th Grade
15 questions
Halloween Characters
Quiz
•
7th - 12th Grade
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
14 questions
Halloween Fun
Quiz
•
2nd - 12th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
21 questions
Halloween & Math
Quiz
•
8th - 12th Grade
13 questions
Halloween Movie Trivia
Quiz
•
9th - 12th Grade
7 questions
Halloween - Myths & Legends
Interactive video
•
10th - 12th Grade
