100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

AP Computer Science A Unit 9 Progress Check: MCQ

Rating
-
Sold
-
Pages
23
Grade
A+
Uploaded on
25-01-2024
Written in
2023/2024

AP Computer Science A Unit 9 Progress Check: MCQ Consider the following class declarations. public class Dog { private String name; public Dog() { name = "NoName"; } } public class Poodle extends Dog { private String size; public Poodle(String s) { size = s; } } The following statement appears in a method in another class. Poodle myDog = new Poodle("toy"); Which of the following best describes the result of executing the statement? - -B. The Poodle variable myDog is instantiated as a Poodle. The instance variable size is initialized to "toy". An implicit call to the no-argument Dog constructor is made, initializing the instance variable name to "NoName". Consider the following class declarations. public class Publication { private String title; public Publication() { title = "Generic"; } public Publication(String t) { title = t; } } public class Book extends Publication { public Book() { super(); } public Book(String t) { super(t); } } The following code segment appears in a method in another class. Book myBook = new Book("Adventure Story"); // Line 1 Book yourBook = new Book(); // Line 2 Which of the following best describes the result of executing the code segment? - -C. Object myBook is created using the one-argument Book constructor, which uses super to set myBook's title attribute to "Adventure Story". Object yourBook is created using super to call to the Publication noargument constructor to set yourBook's title attr

Show more Read less
Institution
AP Computer Science A
Course
AP Computer Science A










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
AP Computer Science A
Course
AP Computer Science A

Document information

Uploaded on
January 25, 2024
Number of pages
23
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Terryl Cornell College
View profile
Follow You need to be logged in order to follow users or courses
Sold
124
Member since
1 year
Number of followers
39
Documents
8393
Last sold
2 weeks ago

3.3

16 reviews

5
2
4
7
3
3
2
1
1
3

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions