Please click here to see my UML diagram

So I know this diagram is really wrong. But I honestly don't know how to express my ideas using UML notation and it is hard to find resources to this very specific case. basically I have these questions

  1. After the customer entered his or her details, the Arrangement class will calculate the cost and the distance based on the info. (Using that information as the input) In this case, is it ok to use calCostAndDis (Customer) : (int) for the function bit?

  2. When I use an arrow and say "has access to", by that I want the variables in one class to be accessible by the other class, meaning the other class contains the those variables. For example, after a customer makes an order, the info will be saved to the CarsRecord class. So that later we can check the info in the record. How can I express it in UML notation? A class stores the info of another class?

  3. If I want the SystemRecord to contain both Carsrecord and ChauffeursRecord, (meaning it has access to both of them as they are part of the system record). Does my graph express this idea correctly?

I am really sorry but I am desperate. I have spent days trying to understand class diagrams but I cannot find anything that explains this kind of situation.

Many thanks in advance.

  • 1
    it looks like there's some additional confusion because it looks like you're trying to model use cases too (like customer has access to cars record)
    – user7433
    Jan 13, 2017 at 17:39
  • Nothing to do with UML, but giving access to class internals to selected classes is not a nice design idea: the class members should be either public, or private (or protected) but not visible to some, depending on needs. This would quickly become unmaintainable (and would obfuscate UML diagram by requiring 2 links: an association and a friend dependency)
    – Christophe
    Jan 17, 2017 at 6:38

1 Answer 1


First of all, there are many good resources out there. Try Google with 'UML class diagram' and you will be having tons of information. You may start with Wikipedia's page for UML class diagram or MSDN reference of UML diagrams.

Now, let's come to your specific questions:

  1. Whenever you wish to describe control flow of a program, you use sequence diagram.
  2. You may take a look at the standard 'relationships' (such as association, aggregation, and composition) between two classes.
  3. What you are looking for is a 'composition' relationship (which can be shown by a rhombus) but you are showing currently an inheritance hierarchy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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