Explain how class diagrams are designed in an object oriented system, with the help of an example.
Class diagrams are often used in object oriented analysis and design to show the various identified objects , their types (classes) , their data and operations and how the relate , or communicate with other objects or classes. Here are some of the standard UML conventions and a sample class diagram to get you started:
Identify the classes in the problem domain:
This is the first and most important step for creating the class diagram. What classes should you include and how to identify them given a problem statement or a scenario? The solution is simple and some time should be spent with the client / system engineers /your teacher in case you are making an academic project or any concerned authority having the required business knowledge.The first step however is creating a problem statement or establishing a set of requirements that the software should fulfill. E.g. you need to create a small library management system. What are some of the requirements for the system? Let’s try to make a problem statement or the scenario for your design. For the sake of simplicity considers the following simple problem Statement. “The library management system would be used by the librarian to keep track of books, library members and the borrowing activity. Not all books can be borrowed by the members. Some books may only be available to review in the library; all such books are termed as Reference books. There are 2 types of library members students and college faculty members. Faculty members can also check out research papers and magazines where as students can only checkout books. The system need to send alerts whenever a book that has to be returned within a specific date is not returned. An email is sent to the librarian and the borrower. The system maintains a catalogue having a description of each book that is available in the library”
Ways to identify Classes:
Do the Noun Analysis: Go through the problem statement again and again and try to figure out all the nouns that you come across. In our case some strong contenders for the classes of the library management system would be: Librarian,Book,Member,Catalogue,Student_Member,Faculty_Member,Reference_Book,Issueable_Book,Alert
Perhaps there might be some nouns that I skipped but why?? I did that intentionally because of either of the two reasons. Either there is no data associated with them. They have no role to play in the system i.e. they don’t have any functions or actions associated
_______ ____ _____ ________ _______ _____ _________ ____ ___ _________ _________.
_____ ________ _____ ________ ____ __________ _______ _____.
_________ _________ ________ _______ __________ _____ _________ ________ _____ _____.
___ ________ ______ _________ ____ ________ _____.
_________ _________ _________ _________ ___.
_____ _______ ______ ___ ______ ____ _______ ________ ___ __________ ________.
___ __________ _______ _____ ____ ______ _______ _____.
_______ ________ _____ _____ __________.
____ _______ _________ ______ ___.
___ _________ __________ ____ _________ _________.
____ _______ _______ ________ ____ ______ _______.
__________ __________ ______ ______ ____ __________ ___ ______.
_____ __________ ____ _______ ________ _____.
_______ _______ _______ __________ _____ ______ ____.
_________ _______ __________ _________ ______ _____ _______ ___ ____ ___.
____ ______ ____ ________ ______ ____ _______ _________.
___ ________ _______ ________ ______.
__________ __________ _______ ________ _______ _______ _________ ________ _______.
_________ __________ ________ ________ __________ ___ ____ _______ ___ __________ ___.
_________ _______ ___ _________ _________ __________ ________ _______ _____ ___ ____ _____.
____ _________ _____ ______ ______.
______ ___ ___ ____ _____ _________ _________ ______ __________ __________ ________.
__________ _______ ___ _______ ________ __________ _______ ________ ________ ________.
_________ ______ ___ _________ _______ _______ ________ _______ _______ __________ ____.
_________ ________ _______ __________ ________ _________ __________ ____ ____ ____ ____ _____.
________ ______ ____ _____ ___ _______ _________ ____ _______ _____.
_______ ___ ________ _______ __________ ___ ________ _____ _______ __________ _____ _____.
______ ___ _________ ______ _______ ____ _____ _______.
_________ ________ ____ __________ ___ ___ ________ ______ __________ ______ ______.
_____ _______ _________ __________ _____ _____ _________ _____ _____ ______.
________ _____ _________ ____ _____ ______ ________.
_______ ___ ________ ______ ____ _______ _________ _________ ______ _______ ______ __________.
______ _____ ______ ___ ___ _______ ________.
_______ _________ ________ __________ ____ ________ _____ _________ ______ __________.
____ ____ ____ ____ _____ ______.
_________ _______ ___ __________ __________.
________ _______ __________ _____ _________ _________ __________ _________.
________ _____ _______ __________ ______ _________ ___ ____ _____ _______ ___ _____.
_______ _________ __________ _________ ________ _____ ___ _____ _________.
____ ________ _______ ________ _________.
____ _________ ___ _________ ___ ________ ______ ____.
___ _________ __________ _____ ___ ___ ____.
___ __________ ______ ____ _______ _____ ________ __________ _________ _________.
______ ________ ____ ____ ______ ____ _______ __________ ___ ___ _____ __________.
______ ________ ______ ________ ___ ___ ________.
_________ ________ _____ _____ _________ _________ _____ _________ ______ _______ ________ __________.
______ _____ ________ ____ ________ ____ _______ ______ ________ ______ ______.
______ ____ ________ __________ ____ ___ _________ _________ ________ _________ ___ _________.
_____ ________ _________ __________ ___ _______ ____ ______.
______ ________ ________ ___ ________ __________ ________ _____ _________.
____ _____ _________ ______ ___ ____ ___ ____ _______ ___ _____ ______.
_______ ____ _____ _______ ____ _______ ________.
_________ ___ ___ ___ ______ ______ _______.
___ ________ ________ _______ _________ _________.
____ _______ _______ ________ ________ __________ ______ __________.
____ __________ __________ ______ _________.
________ ________ _____ _________ ____ _____ __________ __________ _______ _______ ______ ________.
____ ___ _________ _________ ________ ____ _________ __________ _______ _____ _________.
____ ___ ____ _________ _______ _____.
__________ __________ ____ _____ ______ ___ _______ ______ _________.
___ _______ _____ _________ _________ _______ ______ _________ ________.
______ _________ ________ ______ ____ _________ _____ ___ ________ ______ ______ _____.
___ ____ _______ _________ _____ _________ ____ _______ ________ _____ _________ ___.
________ ______ __________ ___ __________.
______ __________ __________ ________ _________ ____ _________ ___ __________ ___.
_________ ___ _______ ______ ____ ____ _______ ___ ___ __________ ___ _______.
_____ __________ ___ ____ ______ _______ ___ __________ _______ ______ _________.
_________ ______ ____ ___ _______ ___ ___ ______ ________.
__________ __________ ____ _______ __________ _____ _______ ________.
____ _____ ___ ____ __________ _______ ______.
_____ _______ ______ _______ ________ ____ _____ ________ __________.
_______ _______ _________ _______ _______ _________ ___ ________ _____ _______.
______ __________ ___ _______ ________.
__________ ___ _________ __________ ________ _______ __________ _____ ___ ___ ____.
_____ _____ _____ ___ ______ ____ __________ ______.
_______ ___ ___ _________ ___ __________ _______ _________ ____ __________.
________ ____ ____ _________ __________ ___.
______ ________ ________ ______ ____ ____ ____.
_____ ________ __________ ___ __________ ____.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
✓ Unlock up to 60% of the answer
✓ No payment required