Question

A subclass method can _____ a superclass method with the same name and parameter types. Select...

A subclass method can _____ a superclass method with the same name and parameter types.

Select one:

a. extend

b. override

c. inherit

d. implement

e. abstract

0 0
Add a comment Improve this question Transcribed image text
Answer #1


The correct option here is

b) Override

Reason:

The Subclass method which is also known as child class method can override a superclass method ( parent class method) when the both the subclass and superclass have the same name and same parameters. It is called "Method overriding"

So the correct option is "Override"

Add a comment
Know the answer?
Add Answer to:
A subclass method can _____ a superclass method with the same name and parameter types. Select...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Which of the following statements is not true about subclass methods? Why? a. A subclass can...

    Which of the following statements is not true about subclass methods? Why? a. A subclass can override methods in a superclass. b. A subclass can define new methods that are not in the superclass. c. A subclass can inherit methods in a superclass. d. A subclass can access private methods in a superclass. e. A subclass can access public methods of its superclass.

  • Which one of the following statements is true? If a subclass constructor makes a super) call...

    Which one of the following statements is true? If a subclass constructor makes a super) call with a non-empty list of parameters, then the parameter types must be well defined in the superclass. Abstract classes do not need a constructor since they cannot be instantiated. Each subclass constructor must contain an explicit super() method. For each subclass constructor, there must be a corresponding superclass constructor with the same signature.

  • The characteristic of object oriented programming that allows the method in subclass that overrides the same...

    The characteristic of object oriented programming that allows the method in subclass that overrides the same method in the superclass to be correctly called from an instance of that superclass is called A. abstractness B. polymorphism C. data binding D. inheritance

  • Assume Superis the name of a superclass and Subis the name of a subclass. If we...

    Assume Superis the name of a superclass and Subis the name of a subclass. If we have: Super s = new Sub(); we can only invoke the methods defined in Super class, and we cannot access the methods added by the Sub class. Is this statement true or false? A. true B. false I appreciate if you put some descritions

  • In Java Which of the following statements declares Salaried as a subclass of payType? Public class...

    In Java Which of the following statements declares Salaried as a subclass of payType? Public class Salaried implements PayType Public class Salaried derivedFrom(payType) Public class PayType derives Salaried Public class Salaried extends PayType If a method in a subclass has the same signature as a method in the superclass, the subclass method overrides the superclass method. False True When a subclass overloads a superclass method………. Only the subclass method may be called with a subclass object Only the superclass method...

  • 1. What does a Java compiler do? Select one: a. Runs Java programs b. Translates byte...

    1. What does a Java compiler do? Select one: a. Runs Java programs b. Translates byte code in ".class" files into machine language c. Translates source code in ".class" files into machine language d. Translates source code in ".java" files into Java byte code in ".class" files e. Translates source code in ".java" files into machine language 2. A subclass will _____ one superclass. Select one: a. abstract b. extend c. implement d. inherit e. override 3. Consider the following...

  • (1)     ____ is the principle that allows you to apply your knowledge of a general category...

    (1)     ____ is the principle that allows you to apply your knowledge of a general category to more specific objects.           a.       Inheritance              c.       Encapsulation           b.       Polymorphism                    d.       Override (2)     When you create a class by making it inherit from another class, you are provided with data fields and ____ automatically.           a.       fonts                      c.       class names           b.       methods                  d.       arrays (3)     By convention, a class diagram contains the ____ following each attribute or...

  • 44 A method signature defines which of the following? (choose all that apply) return type name...

    44 A method signature defines which of the following? (choose all that apply) return type name call parameters body 45 An abstract class can be implemented using the implements keyword. True False 46 An abstract class can be extended using the extends keyword. True False 47 Abstract classes are represented in UML by: italics underline plus/minus bold 48 An abstract class is a superclass for a subclass. True False 49 These symbols are used to denote an interface in a...

  • (a) In Python, a subclass can override a function definition contained in a s (b) In Python, chas...

    CAN YOU DO IT IN 5 MIN its due in 5 min (a) In Python, a subclass can override a function definition contained in a s (b) In Python, chasses cannot be used ns a parameter of a function. (b) (c) To provide constant-time lookup of stored values, the number of buckets in a hash table n to increase as more values are stored. (d) When run on the same input, agglomerative hierarchical clustering always yields the same result (e)...

  • QUESTION 21 In the Java programming language method overriding occurs when (a) and precedes the call with an @Override...

    QUESTION 21 In the Java programming language method overriding occurs when (a) and precedes the call with an @Override annotation a method in a child class calls the method of the same name in one of its ancestor classes (b) when a class defines an abstract method and precedes the declaration with an @Override annotation two or more methods of a class have the same name but different signatures and both of (c) them are marked with an @Override annotation...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT