hi guys , i am going to draw a class-diagram , how determine a class and and association , composition and at last aggregation it has with other classes?
It's not really a matter of determining. When you're designing a system, *you* decide where each makes sense. If you want to do a draft and post it here, we can try critiquing it.
this is a scenario : we have a company , a manager and some employees there , employees send theire request to buy equipments , manager may agree or disagree with their request , in case manager agree , the request will be sent to Storage , if equivalent requested items exist there , the amount of that equipment will be decreased and if not exist , the Storage Manager will make a request sending to purchase unit , and when the items delivered to storage amount will be increased
how i define classes and theire relations ?
I'll give you a hint: generally nouns as singulars are classes. So a manager is a noun, it will probably be a class. Employee is a noun, again will probably be a class. Request, Equipment, Storage. There a couple of others. Their relations are the same things that are described that make sense in the real world. For example, a Manager is an Employee, so that's inheritance (aggregation) (though there are disagreements on this out there). Storage has Equipment, but the Equipment isn't an intrinsic part of storage, that's association. There are also two types of Requests, so these are typically modeled as subclasses of Request.
sorry . how can i model these to subclasses , i don't recognized which types ?
Join our real-time social learning platform and learn together with your friends!