In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how to analyze and design UML object-oriented methods. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Analysis and Design of UML object-oriented method
1.UML object-oriented analysis
The purpose of object-oriented analysis is to model the objective world of knowledge.
In fact, it is also the analysis and understanding of requirements in the process of object-oriented analysis. The process of using object-oriented analysis is generally as follows:
Get problem statement-- > identify class-- > prepare data dictionary-- > determine association-- > use inheritance to refine types-- > perfect object model-- > build object dynamic model-- > build system function model.
(1) to obtain the problem statement is to understand the system with the user, figure out the business logic of the system, and find out the user's needs. At this time, we should look at these requirements as a user. Many designers do not do enough function at this time, making the design and maintenance of the system extremely difficult, and begin to complain about the abnormal requirements of users. After figuring out the requirements of the system, let's not start coding right away. If you have already written a few pieces of code at this time, congratulations, you will have enough in the future.
(2) when we get enough questions and understand them, we can sort out the physical entities and conceptual descriptions that appear in the problems and temporarily mark them into a class entity. Then remove redundant classes and classes that have nothing to do with the system. And finally get our model entity.
(3) build a data dictionary from the class analyzed in the second step, which is likely to play an important role in our database design.
(4) through the second and third steps, we have obtained the entity information in the system, and now we need to make a connection between the entity information.
For example, in a student course selection system. The student is defined as an entity, and the course is defined as an entity, which connects the two entities by electing courses. This behavior is caused by the students. The goal is the course, and the result is whether the student has successfully chosen a course. Through this analysis, we can easily design the method of student class in the future design process.
(5) UML object-oriented analysis needs to use inheritance to refine the class.
Bottom-up: discover inheritance by generalizing the common properties of existing classes to parent classes and looking for classes with similar attribute relationships or operations. These results are often based on existing classifications of the objective world and it is only possible that existing concepts should be used as far as possible. Top-down: refine existing classes into more specific subclasses.
(6) perfect the object model. It is often necessary to repeat the previous process.
(7) establish the dynamic model of the object. According to the object model in the previous steps, the next step is to establish the dynamic model of the object and prepare the script: dynamic analysis starts with finding events, and then determines the possible event order of each object.
Identify events: identify all external events, prepare the event tracking table: represent the script as an event tracking table, that is, the event sorting table between different objects, the objects are the columns in the table, and each object is assigned a separate column. Construct a state diagram: establish a state diagram for each object class to reflect the events received and sent by the object, and each event tracking corresponds to a path in the state diagram.
(8) establish the system function model.
The function model is used to explain how the value is calculated, to indicate the dependence between values and values and related functions. Data flow diagrams help to represent functional dependencies. The general steps for building a functional model are as follows:
First list the input, output values, input and output values are the parameters of the events between the system and the outside world, and establish the data flow graph, which can show how the output values are converted from the input values, and the data flow graph is usually organized according to hierarchy.
2.UML object-oriented design
Object-oriented design is the process of transforming the requirements obtained from the analysis price segment into an abstract system implementation scheme that meets the cost and quality requirements.
(1) UML object-oriented criteria
Modularization: an object is a module, which closely combines the data structure with the methods of manipulating the data to form a module. Abstraction: object-oriented methods support not only the abstraction of processes, but also the abstraction of data. The quality of the abstract method and the level of abstraction have a great impact on the system design, information hiding: through the encapsulation of the object, the number of exposed interfaces and the quality of the interface have a great impact on the system design. Low coupling: low coupling is an important standard of design, which helps to reduce the impact of changes in one part of the system on other parts. High cohesion: modules with high cohesion are easy to understand, easily reused, extended, and maintained.
(2) UML object-oriented practical rules
The results of the design should be clear and easy to understand. The depth from general to specific structure should be appropriate. Try to design small and simple classes. Minimize design changes. (3) system design
System design is an advanced strategy for solving problems and establishing solutions, and basic methods for solving problems must be worked out. System design generally starts from the high level, and then refinement. The design of the system determines the whole structure and style, which provides the basis for the strategy in the later design stage.
Thank you for reading! On "how to carry out UML object-oriented method analysis and design" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, you can share it out for more people to see it!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.