Presentation is loading. Please wait.

Presentation is loading. Please wait.

Conceptual Model or Domain Models

Similar presentations


Presentation on theme: "Conceptual Model or Domain Models"— Presentation transcript:

1 Conceptual Model or Domain Models

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!!!!) Underline nouns to identify concepts in the problem domain. Use the underlined nouns from the use cases to create the concepts in the conceptual model. Some of the nouns, if they identify simple data types, are used to create attributes of these concepts. 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 4- Collaboration Diagram
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.

8

9

10

11

12

13

14 Advantages of noun phrase identification
02/01/2019 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. This technique has many advantages. Narrative language is well understood by everyone on a project and can be an effective communication medium for both technical and non-technical project staff. Moreover, there is usually one-to-one mapping from nouns to objects or classes or interfaces. Using nouns requires no learning curve. The technique is straightforward and well defined and does not require a complete paradigm shift for the beginner.

15 Disadvantages of noun phrase identification
02/01/2019 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. Many sentences in a functional specification may be in the wrong form for easy identification of the objects, and classes. For example,” roll back the transaction” or “the software will compute the average salary”. In many cases, the nouns, especially subjects to sentences, refer to (1) an entire assembly or a computer software configuration, (2) a subassembly or a software component, (3) an attribute, (4) service. A weakness of this approach is the imprecision of natural language. Different noun phrases may represent the same conceptual class or attribute, among other ambiguities. Another weakness is the fact that nouns do not always result in classes, or interfaces, or objects in the problem domain. Many sentences in a functional specification are in the wrong form for easy identification of the objects, classes, and/or interfaces. For example,” roll back the transaction” or “the software will compute the average salary”. In many cases, the nouns, especially subjects to sentences, refer to (1) an entire assembly or a computer software configuration, (2) a subassembly or a software component, (3) an attribute, (4) service.

16 Recommended Approach Noun phrase technique
02/01/2019 Recommended Approach Noun phrase technique Interview the domain experts Conceptual Class Category List Consider whether: it is any real-life entity it is important to the requirement discussion Additional steps: Use the use cases to generate scenarios Use the scenarios to find missing categories and interfaces Record the scenarios. The choice of the approach and technique very much depends on the experience of the modeller and the situation. There is no specific approach that might be suitable for everyone. A novice however, might think of choosing the following steps: 1. Noun phrase technique: Due to the fact that most of the requirement documentation is still written in natural language, it is reasonable to start with noun phrase technique. 2. Interview the domain expert: We want to capture as much information about the domain of interest as possible. One way to do it is to interview the domain experts. The domain experts have a deep understanding of their business domain. 3. Conceptual Class Category List: Use the Conceptual Class Category list to elicit more information. 4. In order to eliminate some potential false classes, consider whether: - it is any real-life entity - it is important to the requirement discussion - it has crisply defined boundary. Finally, we may use additional step, like - using the use cases to generate scenarios, - using the scenarios to find missing categories and interfaces, - and record the scenarios.

17

18

19

20

21

22

23

24

25

26

27

28

29 We are not finished with the attributes yet
02/01/2019 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. The visibility of the objects will be presented when discussing operations and encapsulation.

30

31 Case study University Case Study Note: We have only text description no use case scenarios

32 University Case Study: Identifying classes
02/01/2019 University Case Study: Identifying classes 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. 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 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. Exercise 2: Buidling the model: Identifying classes. Read the text and identify classes in it. Underline concepts (or maybe attributes) , red means association or transaction category concept

33 University Case Study : Classes
02/01/2019 University Case Study : Classes Student Lecturer Book shop Competence Evaluation Course Evaluation Course We have identified six classes. They are Student, Lecturer, Bookshop, Book, Course, Competence Evaluation, Course Evaluation, Course Overlapping, Library, Competence. Finally, we would like to ask our reader whether we need a class called University? Please note that we only deal with the operation at only one university. Hence, we do not need to define any class called University. All the classes defined above deal with this university. However, if we had to manage information about several universities, then we might need create a separate class University, in which we would hold information specific for each university managed in our software system. Book Library Course Overlapping Competence University Do we need a class called University?

34 Advice when finding attributes
02/01/2019 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? When identifying attributes, we must decide upon the data that the object is responsible for knowing and owning. To be able to do this, we may ask ourselves the following questions: 1. How is the object described in general? 2. What parts of the general description are applicable to this problem domain? 3. What is the minimal description needed for this application?

35 University Case Study: Attributes
02/01/2019 University Case Study: Attributes Student Teacher Course pnr: Integer student_name: String address: String nationality: String degree_level: String grade: Integer IQ Integer $average_age: Integer 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_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

36 University Case Study: Identifying associations
02/01/2019 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. Exercise 2: Building the model: Identifying associations. Read the text and identify associations in it. Blue means constraint, many to many will be implemented by adding a transaction class.

37 University Case Study: Associations
02/01/2019 University Case Study: Associations Student 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 pnr: Integer student_name: String nationality: String degree_level: String IQ Integer $average_age: Integer 0..* 0..* teaches 15..* reads 0..* 0..* taught_by  reads  0..* 0..5 Book Course book_number: Integer ISBN_number: String title: String course_description: String price: Real 1..5 course_number: Integer course_name: String course_description: String No_of_students: int teacher_name: String 1..* 0..* uses_book

38 University Case Study: Associations
02/01/2019 University Case Study: Associations Student 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 pnr: Integer student_name: String nationality: String degree_level: String IQ Integer $average_age: Integer 0..* 0..* teaches 15..* reads 0..* taught_by  reads  0..5 We do not need these any more! Book Course book_number: Integer ISBN_number: String title: String price: Real 1..5 course_number: Integer course_name: String no_of_students: Integer teacher_name: String 1..* 1..* uses_book

39


Download ppt "Conceptual Model or Domain Models"

Similar presentations


Ads by Google