Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6475825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:45:05+00:00 2026-05-25T06:45:05+00:00

What is use of an abstract class implementing an interface? In which scenario would

  • 0
  1. What is use of an abstract class implementing an interface? In which
    scenario would we implement.
  2. Why would you choose Abstract class over interface? If an class
    extends an Abstract class, should we implement all the methods in
    the Abstract Class. If an class implements an Interface should we
    implement all the methods too.
  3. Why was abstract class or interface pattern introduced? What is the
    use of them? Does it deal anything in the way object is getting
    instantiated or the way it behaves?
  4. If an abstract class has a static method declared, then can we
    instantiate that class?

I was asked these questions, though my answers were not clear… i would like to know from people here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:45:06+00:00Added an answer on May 25, 2026 at 6:45 am

    On Abstract classes and Interfaces

    Abstract classes defines a partial representation of some entity, that is common to every extending class but that must be completed by inheritance. So, every inheriting class comprehends all the properties defined in every parent classes.

    Interfaces provide a behavior to a given class, and allow to simulate something similar to multiple inheritance. Since you can implement multiple interfaces in a class, you can make that class adopt the behavior of every implementing interface, and all together.

    Classical example:
    Abstract class: Animal Represents an animal in an abstract way. Each animal should extend this class to adopt all the implications of “being” an animal.

    Abstract class: Mammal extends Animal The mammal is an Animal and inherits all the properties that are common to every mammal.

    Some mammals are carnivorous and some herbivorous. These are different behaviors for the same type of animal, so here they come the interfaces.

    Interface: Carnivorous Defines the properties a carnivore animal should have.

    Interface: Herbivorous Defines the properties a herbivore animal should have.

    Every mammal should breath air. This is another behavior, that is common to every mammal.

    Interface AirBreathing Defines the properties for air-breathing animal

    So. You have these two mammals: Wolves and Manatees. Both have to breath air, but wolves are carnivorous and manatees herbivorous.

    Class Wolf extends Mammals implements AirBreathing, Carnivorous

    Class Wolf extends Mammals implements AirBreathing, Herbivorous

    Implementation details

    1) Every abstract method defined in an abstract class, must be implemented somewhere “in the road” of inheritance until a final class is reached. This means that when a final class is implemented it must implement or inherit implementations of every abstract method inherited from parent classes.

    2) Yes, you can define static methods in abstract classes. You can call static method from the abstract class as AbstractClass.staticMethod(), but you can’t ever instantiate an abstract class.

    3) Classes implementing interfaces, must implement every method defined by the interface.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one main interface and an abstract class implementing all derivable methods (that
I have an abstract class and I would like to use it quickly by
An interface is a 100% abstract class, so we can use an interface for
I frequently find myself creating classes which use this form (A): abstract class Animal
I'm working on an abstract class where the implementing class needs to implement a
Possible Duplicates: Interface vs Base class Interface or abstract class? Hi All, I am
I have a class hierarchy where all the implementing classes should have a range
What do people here use C++ Abstract Base Class constructors for in the field?
is it possible to use a method of an abstract class? how can i
In C#, when should you use interfaces and when should you use abstract classes?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.