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

  • SEARCH
  • Home
  • 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 8433123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:18:05+00:00 2026-06-10T06:18:05+00:00

If a design pattern has been used in a class, should the comments at

  • 0

If a design pattern has been used in a class, should the comments at the top of the class or at the top of a relevant method explain the specific design pattern used or the actual functionality.

i.e.

/**
 *  Class MyClass
 *
 * Utilizes Factory Method patter to accomplish xyz
 */

or

/**
 *  Class MyClass
 *
 *  Allows the creation of objects for xyz
 */

This is extremely simplified to illustrate

The main part of my query is whether to rely on other people wondering what design patterns were used, or if it may come across like being a smart arse by just saying what design pattern was used

  • 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-10T06:18:06+00:00Added an answer on June 10, 2026 at 6:18 am

    The common practice is to name your classes (ie XyzFactory) so it’s easy to see what pattern you use and give the actual funcionality in the comment, preferably more descriptive than only describing what the design pattern already does.

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

Sidebar

Related Questions

I'm looking for an example of where the State design pattern has been used
I am reading the book Applying-Domain-Driven-Design-Pattern . In its model design, it has the
I'm using a design pattern that uses the return statement to expose public class
I'm trying to create a really simple Factory Method design pattern example in Java.
From Head First design patterns book, the singleton pattern with double checked locking has
Isn't there a Design Pattern who describes how to high cohesion? I need some
Like any design pattern the Specification Pattern is a great concept but susceptible to
What is a design pattern I can use for generating context-sensitive right click menus
I'm looking for a design pattern to manage a pool of objects. A thread
I'm struggling with implementing the Bridge design pattern (or an alternative such as Adapter)

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.