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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:09:20+00:00 2026-06-11T00:09:20+00:00

Factory pattern consist of classes that implement particular interface. Does it always have to

  • 0

Factory pattern consist of classes that implement particular interface. Does it always have to be an interface? Would it still be a factory method when I have subclasses that inherit from other class not an interface?

  • 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-11T00:09:21+00:00Added an answer on June 11, 2026 at 12:09 am

    The Factory method pattern does not necessarily have anything to do with interfaces (in terms of a language’s interface keyword or construct). You can have factory methods that create class instances, and may construct a subclass instead of the base class just as easily as if you’re using interfaces.

    For example, see this Wikipedia example. Here, a Room is created, with subclasses of the main type creating different concrete types of Room instances. This is still using the Factory method pattern, even though there is no “interface” involved.

    My question is if I “substitute” the interface with a parent class would it still be a factory method?

    Yes – it would still be a factory method.

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

Sidebar

Related Questions

I have read Factory Method pattern. I have a problem when design the latter
Does the Factory Method pattern (not to be confused with the Factory or Abstract
I have this abstract factory pattern that I use in as3 that I am
I have implementated the Factory Pattern as below. However, since the individual classes are
would this still count as the factory pattern if I would use, instead of
I would like to implement Factory Pattern in CSLA. I can use an abstract
I have a lot of classes UNO,HAV,MAS,KOS I want to create a factory pattern.
I've been reading up on the Factory pattern, and have come across articles that
Having in mind the abstract factory pattern, imagine that you have a class hierarchy
I would use them to implement factory pattern, for example: class Types{ static const

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.