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

COMP1231 - Computer Programming II Quizzes and answers already passed 2025

Rating
-
Sold
-
Pages
53
Grade
A+
Uploaded on
13-08-2025
Written in
2025/2026

COMP1231 - Computer Programming II Quizzes and answers already passed 2025

Institution
COMP1231 - Computer Programming II
Course
COMP1231 - Computer Programming II











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

Written for

Institution
COMP1231 - Computer Programming II
Course
COMP1231 - Computer Programming II

Document information

Uploaded on
August 13, 2025
Number of pages
53
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

COMP1231 - Computer Programming II Quizzes and answers
already passed 2025

1. A class declared as final cannot be used as a basis for True.
inheritance.
A method declared as
fi- nal cannot be over-
ridden during
inheritance, while a
class declared as
final cannot be
extended at all.

2. All Java classes are subclasses of the class. Object

Even if you are not
us- ing inheritance,
Java acts like you
coded public class
Test extends Object
{

3. An abstract class must contain abstract methods. False

A class can be
declared as abstract to
disallow in-
stantiation even though
all its methods are
complete.

4. In Java, subclass can only extend one parent class. True

Java only supports
single inheritance



,COMP1231 - Computer Programming II Quizzes and answers
already passed 2025
5. The original class that is used to derive a A parent class | a
new class using inheritance is called . super- class | a base
class

The general case is
called a parent, base,
or super, while the
specific case is






,COMP1231 - Computer Programming II Quizzes and answers
already passed 2025

called a child, derived, or
sub.

6. Of the classes below, the one that is most Animal
likely to be declared abstract is .
a. Bat The higher a class is in
b. Squirrel a UML inheritance tree,
c. Animal the more likely it is to
d. Iguana be ab- stract.
e. Parrot

7. When a variable is declared in a subclass and Shadow
has the same name as a variable declared in a
superclass, it is called a variable. A shadow variable
will have the context
in the subclass, but
not the con- tent that
should have been
present from the
super- class.
8. In order for derived classes to have access to
encap- sulated data members and methods of Protected
superclasses, the data members and
Protected makes the
methods should be declared using the
el- ement available to
modifier.
child classes, but it
would act as private
outside of the par- ent
and child classes.

9. The special reference is used to refer to the Super
parent class in a child class.
Use the reference


, COMP1231 - Computer Programming II Quizzes and answers
already passed 2025
super to refer to
something in
R302,04
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached


Document also available in package deal

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.
LEWISSHAWN55 Yale University
Follow You need to be logged in order to follow users or courses
Sold
87
Member since
2 year
Number of followers
46
Documents
7223
Last sold
1 week ago
THE SHOP FOR EXAMS,TESTBANKS,AQA, WHAT YOU STUDY AND WISH TO PASS THEN COME AND CHECK FOR YOUR NEED ......

WANT TO PASS YOUR EXAMS??? IF YES CHECK OUT MY ACCOUNT FOR ALL YOUR EXAMS NEED BE IT NURSING,REALTORS, HUMAN RESOURCE,MATHS,BIOLOGY,WGU,ICT, YOU BETTER CHECK MY ACCOUNT FOR MORE IF YOU GET WHAT U WANT THEN FEEL FREE TO PURCHASE AT A BETTER PRICE........

3,1

10 reviews

5
5
4
0
3
0
2
1
1
4

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 exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT 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