-1

So I am very new to creating design diagrams. I have a scenario where a user who is an admin of pizza hut selects registration option and the system prompts them to enter customer details.

Upon entering the customer details, the system creates a username and password for the customer and notifies the admin that the customer has been created and also emails the customer to let them know they are fully registered.

Now based on this, here is the UML use case diagram (on the left) and UML class diagram (on the right) I created.

Is it correct at all? If not please give some feedbacks!

enter image description here

New contributor
the feels is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

put on hold as unclear what you're asking by gnat, Jörg W Mittag, Christophe, Robert Harvey, Laiv 2 days ago

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    stackoverflow or stack exchange ? Please do not cross post: stackoverflow.com/q/58773282/3723423 – Christophe Nov 8 at 21:08
  • It doesn't seem to be correct. Why did you model customer name age, email and number as private variables of Admin? These obviously belong to the Customer class. – πάντα ῥεῖ Nov 9 at 9:45
1

No, neither diagram is correct.

In the use case diagram, there are several problems

  • Actors (the stick people in the diagram) are by definition things usually persons) that are outside the system you are designing. Therefor, having an actor with the stereotype <<system>> is a contradiction.
  • Each use-case bubble in a use-case diagram represents an entire use-case. A use-case consists of a success scenario and one or more alternative scenarios.

As you are basing your diagrams on a single scenario, this means that your use-case diagram would consists of a single use-case bubble and a single actor. Depending on how important it is that the actions are performed by an admin user, I would either use the customer or the admin as actor in the diagram.


In the class diagram, there are also a few problems.

  • A class diagram should represent how the system you are designing sees the world.
  • The CustName, CustAge, CustEmail and CustNumber should not be properties of the Admin object, but they should be properties of a Customer object.
  • It is not wrong, but it is unconventional to have a class called system in your design.
0

Quick Short Answer

Feedback:

Your first "Use Case" is missing a Customer actor. Usually, each actor maybe represented by a class in a class diagram, that's why have fields like CustNo, your class / actor is missing.

Warning, there was another answer that tells not to put actors into a class.

The system is the whole use case diagram, that is why is not represented as an actor.

Usually, you should don't put the name of the company, Awsome Quick Service Pizzas, instead, an ID or very short description, of the system, maybe PizzaOrderSystem .

Good Luck.

  • Does your warning refer to my answer? I am not saying that you can't have classes that refer to actors interacting with the system. But the actor in the use-case diagram is not the class in the class diagram. – Bart van Ingen Schenau Nov 9 at 18:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.