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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:42:29+00:00 2026-06-14T21:42:29+00:00

I have some abstract module for my program. Let’s say it’s a GUI module.

  • 0

I have some abstract “module” for my program.
Let’s say it’s a GUI module.
It contains only the interface for the module and its types – for compatibility with other modules (in the other module I can use GUI module and its types, not bothering about it’s implementation).

So I have sth like that:

GUI::Component //represent the abstract component (button, label etc.)
//so it's only the base class for components

GUI::Clickable //if any component is clickable, it must inherit from it

GUI::Button : public Component, public Clickable
GUI::Label : public Component

But even a Label or Button have only virtual methods (I guess they are interfaces of the module). The GUI module impementation’s e.g. SomeGUIImp has to declare SomeButton : public GUI::Button and SomeLabel : public GUI::Label (and they will be transparent for user, because of the object factory).

I don’t want to change anything in the code, I just want to make a proper UML diagram for it.

Are all that elements (Component, Clickable, Button) interfaces? Or abstract classes?

I would like to show somehow , that the Label and Button are “less abstract” (can be used by user more directly, are more specified) than Component.

Also, it would be nice to show the difference between Clickable (it’s functionality) and Component (it’s an abstract base for all components).

Current solution (not sure of it)

I can’t say 100% why, but in my opinion, maybe the Clickable is an interface, Component is an abstract class and Button is just the regular class.

But that shows the relations inside the module, ignoring that Button (which have only pure virtual methods) also is just the declaration for some module’s implementation?

  • 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-14T21:42:31+00:00Added an answer on June 14, 2026 at 9:42 pm

    Since C++ doesn’t have the notion of an interface, when a class is 100% abstract (virtual) you can model it both as an interface or as an abstract class. In your description these classes are closer semantically to interfaces, so modeling them that way would be good. The direction you are taking seems very good IMHO.

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

Sidebar

Related Questions

Let's say I have some classes like this: abstract class View(val writer: XMLStreamWriter) {
Let's say I have some Django model that is an abstract base class: class
I'm writing some callback implementation in C++. I have an abstract callback class, let's
I have some abstract class, in one of its method I use a string
Here is the question's plot: suppose I have some abstract classes for objects, let's
I have created a project that uses scala that has some abstract classes definitions
I have an abstract baseclass with some protected members, but no abstract members: internal
I have an abstract class with some methods,including an abstract method(Execute()).This method is overridden
Suppose I have a Generic abstract class that provides some default constructor functionality so
I'm looking at some Java classes that have the following form: public abstract class

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.