| bloodmark3 (5) | |
|
I've just started in a Data Structures class, and it's been two years since I've done ANYTHING c++ related. I used to be very good at it, aced my classes in c++ and java easily. But since it's been so long I can't remember a thing. I have a uml given to me, but I was never shown how to read them, for instance the centermost box says- -accountNum: integer -balance: float then below a line +getBalance() {query} +withdraw() +deposit There are no clear cut instructions. I'm just supposed to look at these boxes, which apparently are related to some Bank program, and design a c++ program. Can anyone assist please? | |
|
|
|
| L B (3816) | |||
| |||
|
Last edited on
|
|||
| bloodmark3 (5) | |
|
So it's kind of like a rubric then? I see. Thank you for that. Quick question though, what do some of the lines mean. E.I. * and a 1 on the line connecting Account and Customer. Or Checking and Savings having an arrow pointing to Account. Or Bank having a clear diamond on the line connected to account. This all seems like an overcomplicated way to explain what someone wants in a program. | |
|
|
|
| L B (3816) | |
|
I googled "C++ UML" and got this as the first result: http://www.objectmentor.com/resources/articles/umlClassDiagrams.pdf The pictures seem to be matching exactly what you're describing ;) | |
|
|
|
| bloodmark3 (5) | |
| That link was helpful, but doesn't seem to explain {query} or the number 1 on the lines. | |
|
|
|
| AbstractionAnon (517) | |
|
The numbers on the lines in a UML diagram show the types of relationships between the objects in the diagram. You can have 1-1 relationships, 1--* (one-to-many) and *--* many-to-many). You probably have a customer object in your UML, so it should be showing a 1 to many relationship between a customer and an account. i.e. A customer can have one or more accounts. | |
|
|
|
| bloodmark3 (5) | |
| Ahh i see. Thank you. And last thing, what does {query} mean? | |
|
|
|
| L B (3816) | |
| It only gets data, it doesn't change any data. | |
|
|
|
| bloodmark3 (5) | |
| Thank you everyone. | |
|
|
|