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 8397631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:50:24+00:00 2026-06-09T20:50:24+00:00

I have an entity class called Post. Post’s parent is based on an abstract

  • 0

I have an entity class called Post. Post’s parent is based on an abstract class called AbstractPost. AbstractPost has a variable “author” who’s setter’s signature is defined in an interface called PostInterface.

I am in a situtation where I need to override the author’s setters, but don’t want to modify the parents (ofcourse).

These are the parent classes:

class Post extends AbstractPost
abstract class AbstractPost implements PostInterface
interface PostInterface

I have the following classes:

class MyPost extends MyAbstractPost
abstract class MyAbstractPost extends AbstractPost implements MyPostInterface
interface MyPostInterface extends PostInterface

However, I get the error:

Fatal error: Declaration of MyAbstractPost::setAuthor() must be
compatible with that of PostInterface::setAuthor()

I’ve read that children inherit the “implements” part (what is the right lingo here?) of the parent class, so I gues I want to know how to override that. Or am I not extending/implementing in the right way?

Thanks!

  • 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-06-09T20:50:25+00:00Added an answer on June 9, 2026 at 8:50 pm

    The answer is no.

    Overloading the method signature defeats the purpose of having an interface.

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

Sidebar

Related Questions

I have an Entity Framework class called Student. It has a list of Classes.
Conider I have a Class called Entity that has 3 children : ClientEntity ,
I have an entity called File, I created a partial class with a property
I have a GAE Entity called MyFile public class MyFile { static enum LocationEnum
In my business model I have Entity class (IPoint interface ) that has a
I have an entity class that has 10 fields. I am using MS Validation
I have an entity class called catObras, and it inherits from the class NSManagedObject.
I have a scenario where a class called Comment references an abstract type called
I have an entity called Medico which was created as an Entity Class from
I have this entity class, called Pagina and I want to update the entry

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.