Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If A Is-A B, what else can we say about the relationship between class A and class B? Class A extends class B Class A

If A "Is-A" B, what else can we say about the relationship between class A and class B?

Class A extends class B
Class A inherits from class B
Class A derives from class B.
None of the above.
All of the above.

Flag this Question

Question 21 pts

What tool is used to show inheritance or composition relationships among classes.

a class diagram
a flow chart
an object diagram
a family tree

Flag this Question

Question 31 pts

Which of the following is a specialized version of a class.

an ancestor
a subclass
a superclass
class Object
class Class

Flag this Question

Question 41 pts

Which of the following statements is true?

Objects NEVER change the class to which they belong.
In some situations, a variable may be bound to DIFFERENT types of objects.
The behavior of any object is determined by the OBJECT'S CLASS and not by the data type of the variable that references it.
All of the above.
None of the above.

Flag this Question

Question 51 pts

Given this start to a class definition: public class Beta extends Alpha { ... } What is true about instance variables from Alpha?

Class Beta must redeclare all of Alpha's instance variables.
They should not be redeclared in Beta.
The Beta class should redeclare only those instance variables from Alpha that it wants.
Class Beta should redeclare only the private instance variables from Alpha.
None of the above

Flag this Question

Question 61 pts

If class Fruit is the superclass of class Apple, which of the following is also true?

Fruit is the base class of Apple
Fruit is the parent class of Apple
Apple "Is-A" Fruit
All of the above
None of the above

Flag this Question

Question 71 pts

If a class definition does not include the keyword extends, which of the following is true?

The class has no sub class
The class has no super class
The class implicitly derives from Class.
The class implicitly derives from Object.
None of the above

Flag this Question

Question 81 pts

Which of the following things would prevent a method declaration in a subclass from properly overriding an inherited method?

not matching the method name
not matching the return type
not matching the parameter "signature" (number, order and data types of parameters)
trying to make a public method private
All of the above

Flag this Question

Question 91 pts

What is always the very first thing that occurs in the constructor of a derived class?

instance variables are initialized
the value true is returned
a call to the superclass constructor is made

Flag this Question

Question 101 pts

Which of the following statements creates a composition (or aggregation) relationship?

public class Fun extends Hun { ... }
return new Fun();
if ( myThing instanceof Point ) { ... }
private Widget myThing;
Boo Hoo

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Understand the different approaches to job design. page 167

Answered: 1 week ago