




已阅读5页,还剩11页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
学院(部): 计算机科学与工程学院 专业班级: 计算机09-2班 学生姓名: 徐 勤 浩 指导教师: 林 玉 娥 2013年 5 月 29 日1414面向对象(文献翻译)Object-oriented analysis and design The basic concept of object-oriented technology and the basic method1.1 software development method Computer after birth, computer technology has been developing in high speed condition, the development of computer science and technology by original only depends on the development of hardware to relying more on software development. In fact, the development of software technology has experienced more than generation process. First generation (50 to 60 s of the 20th century), in programming languages such as FORTRAN and ALGOL technology marked by algorithm Generation to generation. At that time, the program design on people all creative talents, all rely on tips and tricks. Software productivity is very low, based on the algorithm procedure is very difficult to understand, programmers write their own program over a period of time even after oneself also look not to understand, this to the software modifications, maintenance bring great difficulties. So at the end of the 60 s in the software crisis. Second generation (in the late 1970 s to 80 s prevailing), such as PASCAL, and COBOL programming language and relational database management system for a structured system analysis and design techniques. In order to overcome the software crisis, people made efforts to mainly from the following two directions: Methods from the Angle of the management to improve the software development, software engineering method is proposed, and greatly improve the quality and maintainability of the software. Second is to focus on the analysis in the software development process and design method of research and improvement. Important achievements in this field is developed in the 70 s the rage of structured development method of structured system analysis and design techniques. Third generation (in the 80 s is still prevalent) represented by Smalltalk, c + + object-oriented software development methods. Question 1: what is on the development dynamics of object-oriented software development methods? Traditional structured programming algorithm as the core, the original is closely related to the data and separate to the operation of the data, it is difficult to maintain the consistency of data and operation, its software development method also does not conform to the natural thinking habits, the designed software system solution space and the problem space, the expanded, difficult to understand, modify, and lead to problems in terms of program complexity and software crisis. In order to transcend program complexity barrier, overcome the software crisis, object-oriented software development methods are put forward. Question 2: what are the advantages of the object-oriented software development method? Object-oriented development method to change the past traditional on the basis of function analysis and function decomposition of process oriented structural analysis and design method of object-oriented development method to simulate the way people understand and deal with the objective world to analyze the problem, the system as a series of collections of objects, its object-oriented design and analysis of results is mapped to a structure of object-oriented implementation tool, has a more direct correspondence to mapping process, the analysts, designers, and programmers can use the same concept, so that the object oriented software development can simulate more naturally to the activities of the objective world, making the problem space and solution space on the structure as soon as possible. Therefore, adopting the object-oriented method can more effectively developing large software systems. Object-oriented method of encapsulation, inheritance and polymorphism mechanism not only to support software reuse, and the software maintenance, reliable and efficient software system which can realize flexible manufacturing, better to overcome the software crisis. Therefore, it has become a mature method widely used in software development. By the end of the 20th century, object oriented software engineering development gradually mature, especially the formation of the unified modeling language (UML) standard and widely used, the object-oriented software development methods have become the mainstream of the software development technology. 1.2 the basic concept of object-oriented Object: (1) abstract representations of the objects is an objective entity attributes of the object is described by the data and the data for the operation of the behavior of two parts. (2) class: class is a collection of objects with the same properties and behavior of abstract description; Internal including attributes and behavior of two main parts. (3) example: classes is to have the same properties and behavior of a set of abstract descriptions of objects. Therefore, classes can be used as a user-defined type and create the object model, and according to the model created by the actual example of a specific object is a class, often referred to as examples. (4) the message: the message is to request an object it contains a processing operation on the instruction information. Essence is to the operation of the object of a class function call, the call to a method. For example, student S1; S1. The display () is a message. A news generally consists of three parts: receiving a message object name, the parameters of the function name, function, operation. (5) the three basic characteristics of object-oriented technology: encapsulation, inheritance, and polymorphism (6) encapsulation: the so-called encapsulation is the objects properties and behavior combined into a single unit, to the outside world cannot directly access or modify the data and code, the outside world only through object provides the interface function to change the attributes of the object or obtaining data, it is realized the message is hidden. (7) inheritance: if in a defined on the class, add some special attribute or operation, can form a new class, this class is not only inherited the former all characteristics of a class, and with new features, so as a special case of the class before, is in front of a class to inherit. A class known as the parent class, before the new class is called a subclass. Through inheritance relationship can form a type hierarchy, called inheritance structure. Polymorphism (8) : in different classes, the same function name to realize functions of different functions available. Polymorphisms of the advantages: high-level code (algorithm) write it only once and the lower can be reused for many times, can improve the programming flexibility and efficiency. Object-oriented programming 1.three major mechanisms of object oriented technology (characteristics) : (1) encapsulation mechanism and the design of the class: the so-called encapsulated object attribute data and operation method is allowed to be combined into a single unit, to the outside world cannot directly access or modify the data and code, the outside world only through object provides the interface function to change the attributes of the object or obtaining data, it implements the message hidden; In c + +, class is to support the data encapsulation tool, allowing design class descriptions to abstract a set with the same properties and behavior of the object, namely can encapsulate a set of objects in the class of common properties and methods. Thus, class is the tool to realize data encapsulation, object is the realization of data encapsulation. No package, no object-oriented technology. Class members to access the principle is: (1) define a class, the data members and member functions is the default access private members. (2) a member function can be direct access to the members of the same variables and calls to members of the same function, need not add object name before the function name. (3) members of the private or protected member is limited to the scope of the class that the body and the class member functions; Nonmember functions should be defined as a class of friends to access the private members of a class member function. (4) members of the public scope not only includes the class body, also includes the use of the object which it belongs. Can access to public members outside class, but must be before the member name plus the object name. (2) the inheritance mechanism and derived class definition: the so-called inheritance is allowed on an existing class, add some special attributes or operations, to derive a new class. Not only can the derived class inherits a base class member, and can define new member, so can be as special class of a class before. A class known as the parent class, before the new class is called a subclass. Through inheritance relationship can form a type hierarchy, called inheritance structure. Inheritance is one of the Shared properties between classes and service mechanism. class person /The base class protected: char name11; char sex; int age; public: person() cout“person”endl; person() cout“delete person”endl; int Getage() return 20; class Student:public person private: char id9; float score; public: student() cout“student”endl; student() cout“delete student”Getage();void main() person *p; student s; p=&s; F(p); / p- Getage(); The results :personstudent20delete studentdelete person2. The definition of mechanism of polymorphism and virtual functions: Polymorphism refers to the class hierarchy in the same class or different classes, can use the same function name different operating functionality, which you can use the same call way to invoke these functions with the same name with different functions, such as p - display (). Runtime polymorphism: the class inheritance hierarchy, classes may have different levels of the same name but different functions, the need to run stages according to which class level to determine the call object belongs to the same function. Will only function with the same specification as the virtual function, through object pointer or reference object to call virtual functions, to achieve the runtime polymorphism. UML and its application 1,.the system described in the UML model is composed of one or more views. UML provides 9 kinds of views: use case diagram, class diagram, object diagram, component diagram and configuration diagram, sequence diagram, collaboration diagram, state diagram and activity diagram. The 9 kinds of diagrams can be divided into a use case diagram, static view and dynamic view. 2, can also view is divided into five class diagram of UML, UML content is defined by the five class diagram: The first type is a use case diagram, describe system functionality from the user Angle, and points out the function of the operator. The second type is Static diagram (Static diagram), describe the Static structure of system, including the class diagram, object diagram. The third kind is Behavior diagrams (behaviors diagram) describing the dynamic Behavior of the system and to participate in the activities of the interaction relationship between objects, including activity diagrams and state diagrams. The fourth class is interaction diagrams (Interactive diagram) to describe the interaction relationship between objects, including the sequence diagram and collaboration diagram. The fifth class is Implementation diagram (Implementation diagram). Figure - the view include the component diagram and configuration. 3, use case diagram Definition of the definition of a use case diagram: use case diagram from the Angle of the user use the system describes the system function of graphical representation methods. A Use Case (Use Case) is used to describe a function of the system requirements, it can accurately express the activists of interaction with the system and the system to provide a service. The Use Case of the contact: Use Case except contact activists have the Use Case .There is a certain link between, including: The generalization relationship:(a) a special Use Case with another, more general Use Case (b) Use contact: refers to a Use Case with another Use Case of functional behavior. (c) contain contact: a basic Use Case includes another public behavior of a Use Case. (d) expand contact: refers to a basic Use Case can be made by another functional behavior of the Use Case to expand. 4, the definition of a class diagram System class diagram is an expression of graphic class and its related logic (logic view). Class diagram is the core of object-oriented design, establishes the state diagram, collaboration diagram and other figure. Class and class relationships: the main related, aggregation/composition, generalization/specialized, dependence, etc. 5, the definition of the sequence diagram Sequence diagram describes the dynamic collaboration between a group of interacting objects, which represents the complete one Operating behavior of passing messages between objects and the objects time sequence. The sequence diagram By the object class character, lifeline, activation period and message. 6, the definition of collaboration diagrams Behavior of a system is implemented by a group of objects, these objects are done through interaction and collaboration service system. Used to describe the implementation of certain services involving the relationship between objects and their dynamic views (including communication) are called Collaboration diagrams (Collaboration). Available UML collaboration diagrams to describe the business process. Collaboration diagram is different from the sequence diagram. 7, state diagram (StatechartDiagram) state diagram describes the definition of certain object may have in the process of system operation Status, and jump between different states and external trigger the jump Events. State diagram focuses on describe objects dynamically in its life cycle Behavior. Can also be used for the reaction type object modeling. 8, activity diagrams Definition: activity diagrams are used to describe business process or workflow system. Activity diagrams Is composed of a series of motion state, the movement state of the control can be switched from one state to another and the adjacent state. Activity diagram can also be said that decision state, condition, action of parallel execution and message specification, etc. Available strips of lane put the activity into several groups, let an object is responsible for a group, the object must perform the activities contained within the group. 9, the definition of the component diagram Components are provides a set of interface functions of physical implementation module, it can be the products of the software development process, such as source code and binary code and an executable code, etc. Classes, interfaces, etc. They are the logical model of the physical implementation. Interface is used to describe a class or component of a service operation. Component diagram constitutes the physical components of the system and the link between each other. Component diagrams can be according to the source code, database, system, but does not represent some sort of physical things. Components must be configured on a node, performed by the node. 10, the object oriented system development method based on UML can also be divided into the following steps: (1) the system requirements analysis: (a) captured or describe the functional requirements and non-functional requirements; (b) tectonic system use case model; (c) detail the use case (2) systems analysis: convert the use case model, analysis model for describing the system basic structure. Analysis model is a series of classes and class instances and their mutual relations. Analysis in the model class is also called analysis class. Commonly used method is to use a noun/verb analysis method to find analysis class. There are three kinds of analysis classes: entity, boundary and control classes. (3) System design: (a) augment and refine class. Further expand class defined in the analysis phase, and to define new classes to deal with technical issues, including handle nonfunctional requirements. (b) for each use case establish dynamic model, including sequence diagrams, collaboration diagrams, etc., to describe how to implement case through collaboration of objects in the class diagram of the function. (c) through dynamic modeling to revise and improve the class diagram. (d) design subsystem. Is the unit organization in the design model into manageable function module, which is one way to implement componentization model. (4)System implementation :(a)The class diagram of the logic model elements (such as class, interface, etc.) grouped packaging form each component is easy to implement, and to establish the connection between the components, constitute a component diagram. Component diagrams can represent a systems components and their connection, clearly describe the software architecture of the system. (b) implementation component. With programming realization of components has to implement component in the component diagram, programming programming can also be used for the components in the component diagram, finally realizes the system can run. 11, based on UML of relational database design is divided into four stages: Business Use C
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 疫情防护安全培训方案课件
- 第12课 修饰文字和图片说课稿-2025-2026学年小学信息技术(信息科技)第3册鲁教版
- 求平均数课件
- 淘宝店铺接待知识培训课件
- 疫情紧急法律知识培训课件
- 任务一 社区垃圾我捡拾教学设计小学劳动鲁科版四年级上册-鲁科版
- 氯气的用途教学课件
- 疫情知识培训目的课件
- TdT-IN-1-生命科学试剂-MCE
- SOS1-IN-21-生命科学试剂-MCE
- 2025年高中英语教师课程标准考试测试卷及答案(共三套)
- 工业园区管委会环保培训
- 【基于近几年数据的欧派家居盈利能力案例分析(数据图表论文)19000字】
- 产品物料编码管理制度
- 2025年急性肺栓塞诊断和治疗指南解读课件
- 无痛分娩试题及答案
- 八年级物理上册(人教版2024)-新教材解读培训课件
- 施工现场实施信息化监控和数据处理施工现场实施信息化监控和数据处理及风险管理措施(工程技术标)
- 帮忙找工作协议书
- 资产实缴代办协议书
- 转让账户协议书
评论
0/150
提交评论