Download presentation
Presentation is loading. Please wait.
Published byWalter Stafford Modified over 9 years ago
1
Conceptual Model or Domain Models Chapter10 Applying UML and pattern
2
OUTLINES UML overview, where are we now? Conceptual model: – Concepts – Attributes – Associations
3
UML Process (OVERVIEW) 1- Use Cases – Define user interaction with the system. 2//- Conceptual Model (we are here right now!!!!) n Underline nouns to identify concepts in the problem domain. n Use the underlined nouns from the use cases to create the concepts in the conceptual model. n Some of the nouns, if they identify simple data types, are used to create attributes of these concepts. n Create associations between the concepts.
4
2//- System Sequence Diagram (We have done this it can be done before or after conceptual model or in parallel with it) – Create system sequence diagrams for each use case scenario. – Each sequence event in the diagram corresponds to a user interaction with the system specified by the expanded use case.
5
3- System Contracts – Specify post-conditions for each system event in the system sequence diagrams. – Use the conceptual model to identify objects created, associations formed, and attributes modified. 4- Collaboration Diagram – Create a collaboration diagram for each system event. – Apply patterns
6
5- Class Diagram – Add methods and additional attributes which were discovered in the collaboration diagrams to the classes in the conceptual model. 6- Code – Create classes with their names, attributes and method signatures taken from the class diagram. – For each method on a class, use the collaboration diagrams to find the sequence of messages generated when the method is called and create at least one line of code for each message.
7
Conceptual model is also named domain model is an analysis-level activity - a model of real- world objects - and not an attempt to design the actual software.
14
Advantages of noun phrase identification Narrative language is well understood by everyone on a project An effective communication medium for both technical and non-technical project staff. Usually, one-to-one mapping from nouns to objects or classes or interfaces. No learning curve.
15
Disadvantages of noun phrase identification The imprecision of natural language. – Different noun phrases may represent the same conceptual class or attribute, among other ambiguities. Nouns do not always result in classes, or objects in the problem domain.
16
Recommended Approach Noun phrase technique Interview the domain experts Conceptual Class Category List
19
The Need for Specification or Description Conceptual Classes Add a specification or description conceptual class (for example, ProductSpecification)when: 1.There needs to be a description about an item or service, independent of the current existence of any examples of those items or services.
20
The Need for Specification or Description Conceptual Classes 2.Deleting instances of things they describe (for example, Item) results in a loss of information that needs to be maintained, due to the incorrect association of information with the deleted thing. 3.It reduces redundant or duplicated information.
21
Domain Modeling Guidelines How to Make a Domain Model Apply the following steps to create a domain model: 1. List the candidate conceptual classes using the Conceptual Class Category List and noun phrase identification techniques related to the current requirements under consideration. 2. Draw them in a domain model. 3. Add the associations necessary to record relationships for which there is a need to preserve some memory 4. Add the attributes necessary to fulfill the information requirements
30
We are not finished with the attributes yet We still need to discuss – class-based types – attribute visibility These issues require deeper knowledge of modelling. Hence, they will be discussed later on as the course progresses.
32
Case study University Case Study Note: We have only text description no use case scenarios
33
University Case Study: Identifying classes We need write an application supporting us in managing the information about university operation. Right now, at Stockholm University we have a substantial amount of students - 35 000 students. To manually manage all information about students is simply impossible. Hence, SU needs some automated support. In addition to this, we need handle information on courses and lecturers giving these courses. Recently, SU has taken over the library and book shops. They want to provide better service to their students, and they want to better integrate the management of course literature with all other courses given at SU. Hence, they wish to automate the book management as well. This gives them better insight into the education on the course level, and provides a solid basis for evaluating the courses and a basis for establishing the incremental educational programme. The knowledge of which books are utilised on which course helps them identify the overlapping in the educational material. To be able to provide high quality education, SU must have highly competent lecturers. SU wishes to store information about their lecturers and their state of competence and its development. By competence, SU means professional, pedagogical and administrative competence. Underline concepts (or maybe attributes), red means association or transaction category concept
34
University Case Study : Classes Student Book Lecturer Course Book shop Library University Do we need a class called University? Course Evaluation Course Overlapping Competence Evaluation
35
Advice when finding attributes How is the object described in general? What parts of the general description are applicable to this problem domain? What is the minimal description needed for this application?
36
University Case Study: Attributes Student pnr: Integer student_name: String address: String nationality: String degree_level: String grade: Integer IQ Integer $average_age: Integer Teacher pnr: Integer teacher_name: String role: String ped_competence: String admin_competence: String prof_competence: String percentage_of_full_time: Integer salary: Integer martial_state: String research_engagement: String Course course_number: Integer course_name: String course_description: String no_of_students: Integer teacher_name: String equipment_type: String Book book_number: Integer ISBN_number: String title: String price: Real
37
University Case Study: Identifying associations Students at SU may take many different courses. The students however, should not take more than five courses during one semester. A course may only start if there are at least 15 students registered. Otherwise, the course has to be cancelled. Teaching for less than 15 students would be too expensive. The courses are taught by lecturers. The fact that you are a lecturer does not hinder you from taking courses at university. There may be cases that a lecturer takes and teaches on one and the same course simultaneously. This is in cases when the lecturer is a PhD student. The work he has put into developing and teaching on a course will give him credit point within his PhD studies. So lecturers may take courses as well. Each university course is based on some book. One course may be based on at least one book. However, many books may be read on one and the same course. Blue means constraint, many to many will be implemented by adding a transaction class.
38
University Case Study: Associations Student pnr: Integer student_name: String nationality: String degree_level: String IQ Integer $average_age: Integer Teacher pnr: Integer teacher_name: String role: String ped_competence: String admin_competence: String prof_competence: String percentage_of_full_time: Integer salary: Integer martial_state: String research_engagement: String Course course_number: Integer course_name: String course_description: String No_of_students: int teacher_name: String Book book_number: Integer ISBN_number: String title: String course_description: String price: Real 1..5 15..* reads taught_by reads 0..* 1..* 0..* uses_book 0..* teaches 0..* 0..5
39
University Case Study: Associations Student pnr: Integer student_name: String nationality: String degree_level: String IQ Integer $average_age: Integer Teacher pnr: Integer teacher_name: String role: String ped_competence: String admin_competence: String prof_competence: String percentage_of_full_time: Integer salary: Integer martial_state: String research_engagement: String Course course_number: Integer course_name: String no_of_students: Integer teacher_name: String Book book_number: Integer ISBN_number: String title: String price: Real 0..* teaches 1..5 15..* reads taught_by reads 0..5 0..* 1..* uses_book We do not need these any more!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.