COP 3330 EXAM 2 EXAM WITH CORRECT
ACTUAL QUESTIONS AND CORRECTLY
WELL DEFINED ANSWERS LATEST 2024 –
2025 ALREADY GRADED A+
Multiple inheritance of type in polymorphism refers to what situation in object
oriented programming? - ANSWERS-A class can implement more than one
interface AND An object can have multiple types
When polymorphism is applied to OOP it means that - ANSWERS-Subclasses can
share some of the same behavior of the parent class but also can define their own
unique behaviors
Polymorphism in the Java programming language allows for extending multiple
superclasses. - ANSWERS-False
Classes that cannot have objects created from them are called - ANSWERS-
abstract classes
,Abstract classes are used only as superclasses in inheritance hierarchies and are
referred to as - ANSWERS-abstract superclasses
Interfaces can be implemented by other classes. - ANSWERS-True
Interfaces cannot be extended by other interfaces. - ANSWERS-False
When defining a method interface, it MUST be specified public, otherwise it is
only accessible where in a project? - ANSWERS-package
What is NOT a reason to develop interfaces? - ANSWERS-There is always a single
programmer who defines everything so they are in charge of the interfaces as
well
Interfaces can be instantiated. - ANSWERS-False
Interfaces can contain only: - ANSWERS-default methods
static methods
constants
nested types
method signatures
, In a public interface body what are automatically considered public even if the
programmer doesn't put the public access modifier on the associated method or
member? - ANSWERS-static methods
Constant declarations
default methods
abstract methods
If an interface is declared public then a programmer can omit the public access
modifier for all abstract, default, and static methods. - ANSWERS-True
A programmer can define a reference variable with an interface as its data type if
the constructor call to the left of the equals sign (=) is a class instance that
implements that interface. - ANSWERS-True
If a class implements an interface and extends a class, the resulting class can be
an instance of:
1. The interface
2. The superclass
3. The subclass - ANSWERS-True
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller NurseLNJ. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $14.99. You're not tied to anything after your purchase.