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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:30:58+00:00 2026-05-13T23:30:58+00:00

I would like your guidance on how to create classes and their relationships (generalization,

  • 0

I would like your guidance on how to create classes and their relationships (generalization, association, aggregation and composition) accurately from my USE case diagram (please see below).

I am trying to create this class diagram so I can use it to create a simple online PHP application that allows the user to register an account, login and logout, and store, search and retrieve data from a MySQL database.

Are my classes correct? Or should I create more classes? And if so, what classes are missing? What relationships should I use when connecting the register, login, logout, search_database and add_to_database to the users?

I’m new to design patterns and UML class diagrams but from my understanding, the association relationship relates one object with another object; the aggregation relationship is a special kind of association that allows “a part” to belong to more than one “whole” (e.g. a credit card and its PIN – the PIN class can also be used in a debit card class); and a composition relationship is a special form of aggregation that allows each part to belong to only one whole at a time.

I feel like I have left out some classes or something because I just can’t seem to find the relationships from my understanding of relationships.

Any assistance will be really appreciated. Thanks in advance.

USE CASE DIAGRAM

alt text

USE case explanation:

Register
Any users can create an account by registering. The system will validate the user name and password and will reject them if either they are missing or if the user name is already taken.

Login
Any users can login only if they have already registered. Their user name and password will be validated in the same manner as when registering an account.

Search Database
Any users will beable to input a searchkey of datatype string and the system will open the database, search for the searchkey, and return true or false depending on whether or not the searchkey was found, and close the database.

Add data to database
All users will be able to input some data, the system will open the database, store the data, return true or false depending on whether or not the data was stored, and close the database.

Logout
The user will press the logout button, and the system will logout the user

Delete from database
Only the administrator can delete data from the database.

Delete regular users
Only the administrator can delete a regular user

CLASS DIAGRAM

alt text

  • 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-13T23:30:59+00:00Added an answer on May 13, 2026 at 11:30 pm

    First, if you’re determined to go down a modeling path, then I’d recommend a book by Rosenberg and Stephens, Use Case Driven Object Modeling with UML. This goes through a process exactly what you’re describing: how to write good use cases, build class diagrams from them, build sequence diagrams from that, and (ta-da!) code it up into working software. You might be able to Google for the ICONIX process and find details online.

    Some casual comments:

    • The ‘diagram’ of any Use Case Diagram is the least useful aspect of use cases. Every oval on the diagram represents a paragraph or two of text telling the story of what’s going on. It’s that text that’s really helpful.
    • Usually you have classes for the nouns in your use cases, and methods for the verbs. Some of your verbs (Add_data_to_database, Logout, …) are classes instead of methods.
      • Sometimes you get this sort of thing if you use a framework that encourages a command pattern. Even then, the command objects can/should just invoke methods on your real classes.
      • I would say you’re missing some nouns (what type of data are your storing in the database?). If you had that, then you would find relationships between User‘s and those data classes.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to ask your guidance on how to authenticate using email add/
would like your comments. Eg: When user first visit www.testing.com/productdetailpage.asp I will use caching-
I would like your suggestions on how to proceed in making a control panel
I would like your advice about how best to solve my problem. In a
As I am new to this I would like your advice. So far I
I'm trying to implement an ACL and I would like your opinion about which
I would just like your feedback on something. Basically I have a value called
I would really like your help in knowing the procedure to delete a .3gp
I would like to get your opinion on as how far to go with
I would like to know your opinion about using Cassandra to implement a RBAC-like

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.