To design an object-oriented system, follow these steps:
1. Survey and complete a detailed requirement document
(1) What functions should the system implement?
(2) What are the special performance requirements?
(3) What are technical difficulties? If possible, the technical difficulties should be tested first.
2. Determine the operating environment of the system
(1) Operating Systems: widows, Linux, UNIX, etc.
(2) programming languages: C/C ++, Java, and C #
(3) interface interaction environment used: console, MFC, wtl, etc.
(4) which third-party libraries need to be used: opencv, STL, boost, etc.
3. Divide system modules and design the overall block diagram
(1) which modules can be divided by the entire system in a large direction, and which small modules can be further divided by each module.
(2) What are the functions provided by each module?
(3) how to interact between modules
4. analyze the requirements of the module and abstract various classes that implement the module functions.
(1) which classes can be designed in this module and which classes serve as external interfaces of this module?
(2) How do classes in a module interact? How do classes between modules interact?
(3) When designing a class, consider whether the design can be simplified by inheritance, combination, and other methods.
(4) Draw a simple UML design diagram
5. design the attributes and methods of each class
(1) What member variables does each class have? What functions are provided?
(2) which functions are obtained through inheritance, which functions need to be overloaded, and which functions need to use polymorphism?
(3) define the Class header file
6. Implement the functions and integration tests of each class
(1) coding to implement the functions of each class
(2) Based on the previous design, complete the interaction code between classes to implement the functions required by the system
(3) Integration and testing, code optimization, and bug Modification