OOAD & UML learning notes

Source: Internet
Author: User

Thursday

OOAD (object-oriented analysis and design)

1. Definition of OOAD methodology
Answer: 1) Object-oriented is a system modeling technology;
2) describe the system as many interacting objects;
3) Interaction objects in the system are organized into classes;
4) the OO methodology consists of the following three parts:
. A process
. A symbol
. A series of rules
 
2. In an OOAD software development process, we need to complete two different tasks:
Answer: 1) at the analysis stage, we will mainly:
. Establish a clear view of business issues;
. Outlines the tasks that must be executed by the system;
Create a general vocabulary for business problem description;
. Outlines the best solutions for business issues.
2) in the design stage, we mainly:
. Solve business problems;
. Define "how" to replace "what ";
. This section describes the supporting elements for system work;
. Define system implementation policies.

3. Object
Answer: 1) It is a single, unique entity or project;
2) used as an object-oriented building block;
3) Identity, data, and behavior;
4) It can be simple or complex;
5) can be real or imagined;
6) attributes and operations are available;
7) is a dynamic instance of a class;
 
4. Class
A: an abstraction of multiple identical objects. All objects are created from classes.

5. Features of Object-Oriented Programming
Answer: 1) define action (abstract ):
Ignore details and process the essential features of objects or entities;
. Simplify functions and information;
. Helps users interact with objects;
2) Encapsulation (encapsulation ):
. Hide object data;
. Process two views of each object:
A. External view: displays what an object is doing;
B. Internal view: shows how an object completes its tasks;
3) Association)
. Interaction between objects;
. One object uses the service of another object or operates on another object. At this time, the object is correlated.
4) aggregation (aggregation)
. Defining an object is an integral part of another object;
. Is a relatively strong association;
. The "has a" link can be used for confirmation. A car has wheels, seats, and doors. They are components of a car. If you remove any part of it, the car does not have the corresponding function, but it is still a car.
5) composition (synthesis)
. One object contains another object;
. Is the strongest form of association;
. The "contain" link can be used for confirmation.
. Assume that the part does not exist and the object does not exist.
6) Inheritance (inheritance)
. Is a mechanism for defining new classes based on existing classes;
. Confirmation can be made through the "is a" or "kind of" relationship;
. You can organize related classes so that these classes can be managed and reused together.
7) Cohesion and Coupling)
. Cohesion: Measurement of the contribution of one or more classes to a single function in the system;
. Coupling: a measurement of the closeness between two or more classes;
8) polymorphism (polymorphism)
. Different objects complete the same semantic results;
. Based on inheritance;
. The implementation of the polymorphism function depends on the objects it applies;
For example, football-throwing-requires two hands, tennis-throwing-only one hand, the same is throwing, there are different implementations. When you give different balls to a child, he knows whether to use one or two hands. All children know polymorphism.

6. Development Process Preview
Answer: 1) traditional development process:
. Waterfall development: requirement-> analysis-> Design-> Implementation-> test. Each step is completed and documented before entering the next stage.
If a problem occurs in the later stage, it is difficult to return to the previous stage.
. The project team members spend a lot of time and energy at each stage to ensure it is correct.
. The symbols and terms used in each stage are changed. Although the completed software is correct, it has little to do with the business logic it represents.
2) OOAD Development Process
A typical solution is to use a project as a series of small projects;
. UML (uniied Modeling Language) is a symbol rather than a processing process;
. Usdp (uniied software development process) is iterative and incremental;
Both. usdp and Rational Unified Process are popular OOAD processes.

7. Iterative incremental project lifecycle
Answer: 1) "iteration" refers to every step in the lifecycle;
2) The result of iteration is the step-by-step increase of the project's function completion;
3) In the build phase of each iteration, you should:
. Select and analyze related use cases;
Use the selected architecture to create a design;
. Design with components;
. Verify that the component meets the requirements of use cases.

8. Main stages of iterative incremental Lifecycle
Answer: 1) inception (start) stage:
. The growth at this stage is concentrated in:
A. start the project;
B. Establish commercial principles for this project;
C. Define a business issue;
D. Identify potential risks;
E. Define a scope for better understanding of the problem;
F. Create an explanatory document on business issues.
. Each cycle includes up to one repetition, and the completion results of each stage are milestone.
2) Elaboration stage:
. The growth at this stage is concentrated in:
A. high-level analysis and design;
B. Establish an architecture baseline for the project;
C. monitor potential risks;
D. Create a construction plan to achieve the project objectives;
3) The construction (build) stage:
. The growth at this stage is concentrated in the increasingly forming of software projects;
4) The transition phase:
. The growth at this stage is concentrated in:
A. Release the product to the customer;
B. Complete the beta test;
C. Performance adjustment, user training, and acceptance testing.
9. Work steps during the phase
A: 1) Each stage consists of the following five work steps:
. Requirement
. Analysis
. Design
.
. Test
2) different iterations have different degrees of completion for each work step;
3) The first step is covered in depth repeatedly in the early stage, and the last step is covered in depth repeatedly in the future.
4) 8/2 principle: If 80% is completed, the next iteration will take place.

10. Repetition and work steps
A: 1) You can include any of the five work steps as per your needs.
2) The early repetition process is concentrated on the previous work steps, and the later repetition process is concentrated on the back-to-back work steps.
3) You can:
. Continue and make corrections in the next iteration;
. Continue and add a new problem of iterative process correction;
If time permits, return to the current repetition and correct this problem.
4) perform different steps repeatedly to varying degrees.

11. Benefits of iterative incremental Lifecycle
Answer: 1) reduce the cost;
2) better guarantees the project progress;
3) the development speed is faster for the development team;
4) adapt to changes in user requirements;

Introduction to UML

1. UML Definition
A: 1) UML is a graphical language used:
. Description;
. Build;
. Visible to the naked eye;
. Documented system prototype;
2) In the analysis phase, you create a class chart to help you understand the business concept (details not yet implemented );
3) In the build phase, we add additional details to the same class chart-to implement business details;

2. Relationship between UML and blueprint
A: Developing OOAD Program-UML
Building a house-Blueprint

3. UML Graphic Type
A: 1) static model: represents the basic structure of the software system you are modeling;
2) Dynamic Model: emphasizes system behavior;

4. Static Model
Answer: 1) construct and document the static aspect of a system;
2) reflects the basic and stable framework of a software system;
3) representatives of the main elements of the Creation question;
4) composed of shapes:
. Use case diagram
. Class Diagram
. Object graph
. Component and deployment Diagram

5. Dynamic Graph
Answer: 1) construct a chart that displays system behavior;
2) composed of shapes:
. Sequence Chart
. Collaboration Diagram
. Status chart
. Activity diagram

6. use case diagram
Answer: 1) show who or who uses the system and its features;
2) the user with the features in a Use Case chart is called "actors ";
3) Use Case represented by an elliptic;
4) To make modeling easier, use case charts need to be sorted in order;

7. Class Diagram
Answer: 1) represents a series of objects that contain common attributes and features;
2) Structured images display a series of classes, interfaces, collaboration between objects, and relationships;
3) It consists of up to one rectangle that describes the following information:
. Type (class name)
. Optional Properties
. Operation Section

8. object graph
Answer: 1) represents a clear object.
2) Structured images display a series of objects and their relationships

9. Component Diagram
A: displays the relationship between software components.

10. Deployment Diagram
A: displays physical devices that can be used to deploy software applications.

11. Timeline chart
Answer: 1) messages that occur within a certain time range of different objects;
2) emphasize the time sequence of messages

12. Collaboration Diagram
Answer: 1) the collaboration between objects is displayed during the use of messages;
2) structural organization that emphasizes sending and receiving messages;

13. Status transition diagram
Answer: emphasize the Event Sequence of object behavior.

14. activity diagram
A: 1) describes the process from one activity to another.
2) emphasize the process from one activity to another

15. Package symbols
Answer: 1) It refers to a way to organize projects;
2) It is usually used to control the namespace of the class;
3) use the package organization class, software components, hardware components, other packages, and anything else related to your model in UML.

Friday overcast

Requirement and initialization Analysis

1. Start the development process
Answer: 1) analyze the initial workflow;
2) Collect information;
3) create a problem status;
4) Create use cases;
5) Introduce components and deployment diagrams;

2. Collect information
A: You can collect information from many resources, including:
. User initialization requirement details
Industry experts
. Customers and users
. Manager
. Market
. Similar projects in the past

3. Avoid habitual assumptions
A: 1) You must avoid habitual assumptions, including:
Users are naive and developers are the clearest.
. The requirement is static.
. A correct solution can be established at the beginning.
2) Remember that the development of the project and the customer's needs are changing.
3) To avoid these assumptions, we should:
. Clarify user requirements
. Make sure your model can adapt to changing needs.
. Make sure you can modify your model

4. Industry experts
Answer: 1) experts in a specific business field
2) can be roughly divided:
. General industry expert
. Specific Application industry experts and current business experts
. Experts in similar business fields
3) It is difficult to abstract general elements from other fields without industry experts

5. Problem Statement
A: 1) Does the document clearly describe customer and system requirements?
2) user input is important to documents
3) use the language and vocabulary familiar to the customer
4) The sentence is clear and you don't need to talk about it.
5) cover the project details
6) detailed explanation of the problem background
7) detailed descriptions of known constraints
8) the issue statement provides constraints on the business background, scope, and computer terminology. It is used as the basis for determining the scope of the problem.
 
6. Optional values of objects and Classes
Answer: 1) You can confirm from the question statement.
2) Underline the noun phrase in the question statement to create a list of objects and class candidates
3) In the next analysis phase, you need to determine the list of objects and classes required in your system.

7. Data Dictionary
A: 1) describes all the vocabulary documents used for the project.
2) accumulated terms through communication with users
3) used for the entire project and System
4) new terms will be added continuously throughout the project
5) help eliminate ambiguity
6) It must be available to all project team members.
7) data dictionary is very important for communication between teams in large projects. In this case, it is both a commercial document and a system document.

8. Create Use Cases
Answer: 1) a use case is a graphical representation of user-system interaction;
2) It is a tool for defining and understanding system requirements and background;
3) is a simple impression of any system. When you collect all your impressions, you have the entire system description;
4) The image is represented by the real-line elliptic.

9. "include" and "extend" in the use case diagram"
Answer: 1) "include" focuses on the Inclusion relationship. Before completing a module, you must use another module;
2) "extend" focuses on the Expansion relationship, Maybe or maybe not based on a certain module, and is not mandatory;

10. Plot assumptions in the use case
Answer: 1) the use case shows the functions of the software from the user's perspective. There may be more than one way to complete a specified function.
2) a hypothetical plot refers to an instance of the case-a logical path from start to end.
3) plot assumptions do not include conditional statements-because they describe one of multiple possible paths of the user.
4) All plot assumptions start from the same method, but the results are different.
5) The successful or unsuccessful paths in a use case should be displayed. In an ATM, you must consider some scenarios, such as incorrect user's personal ID number input or insufficient amount.
 
11. Use Case form
Answer: 1) summary of each use case
2) the use case form is not the content of UML, but it is recommended to complete it.
3) This form includes the following items:
. Use Case name
. Participants
. Priority
. Status
. Extended content
. Preprocessing/hypothetical plot
. Submission Conditions
. Event stream
. Optional path
. Run
. Frequency

12. activity diagram
Answer: 1) after creating a Use Case chart, you can use the chart to describe the activity or workflow.
2) graphical display of all hypothetical plots of Use Cases
3) display activities, processes, or workflows

13. Risk assessment
Answer: 1) It is necessary to evaluate the risks of the project.
2) use cases can be the starting point of risk assessment
3) High-risk use cases should be developed in early iterations.
4) risks can be found in the following aspects:
. Demand risk
. Technical Risks
. Skill risk
. Resource risks
. Policy risks

14. Demand risks
Answer: 1) Demand risk refers to the failure to fully meet the customer's needs.
2) You should involve all users and managers working on the system.

15. Technical Risks
A: Remember that proven technologies are less risky than unconfirmed ones.

16. Skill risks
A: Make sure you have all the skills you need.

17. resource and policy risks
Answer: 1) resource risk refers to the amount of time out and the budget.
2) political risks refer to conflicts with current political rules

18. Package Diagram
Answer: 1) There are symbols in UML to wrap any logic-related UML elements (classes, objects, use cases, etc );
2) similar to Java, related classes are organized into different packages;
3) this symbol is like a folder icon;
4) helps reduce complexity;
5) dependency between packages;
6) The package helps:
. View a large image without too many details;
. View a small portion of the independent parts;
. Create a small part of the part;
. Display dependencies between components;
The component diagram shows the physical organization of code, which can be a class file, Java source file, JAR file, Java package, shared library, object code, RDB, and so on;
. When a component changes, it can affect other -- dependencies;
. The component should have a good interface, so that you can use other components that implement this interface to replace it.

19. Deployment diagram Introduction
Answer: 1) displays the physical relationship between hardware components;
2) each symbol represents some hardware devices: servers, workstations, personal PCs, sensors, clocks, telephone switches, etc.
3) When you obtain information, you can add and modify it at any stage.
4) the connections between symbols are displayed along with the protocol.

System Object and Class Analysis

1. Understanding in the analysis phase
A: 1) define what the system must do;
2) avoid the problem of description and implementation;
3) focus on system components;
4) in the analysis phase, determine what the object needs during operation to ensure that the system has the correct functions;
5) in the analysis phase, after the requirement Collection and Use Case phases, before the system design phase;
6) when determining which classes and objects are used, you should answer the following questions:
. What objects constitute this system?
. What is a possible class?
. What is the responsibility of each object or class?
How are objects and classes associated?
7) Remember to add all new projects to the data dictionary;

2. keyword extraction
Answer: 1) When you define the objects that constitute the system, you should create a list that meets the system function objects;
2) the objects in the list are called object candidate values;
3) Then you can prepare a sublist for the most important objects in the list;
4) KEYWORDS represent the primary or first object in the system;

3. Use UML to represent objects and Classes
Answer: 1) the object model displays a logical and special static view;
2) There are two types of object models:
. Class diagram: shows the classes required to create a system. You can use a class to create many objects at runtime. The class graph must display all possible relationships between classes.
. Object graph: represents the real objects in the system and describes the relations between China and foreign countries in a specific case.
3) You can use the primary key to create class charts and object graphs.
4) Class charts will be updated and corrected throughout the analysis phase.

4. attributes and Methods
Answer: 1) the object contains attributes that define the object state;
2) The method defines the operations that the object can perform;
3) Therefore, the class must define these attributes and methods;
4) before class execution, you must define all attributes and methods;
5) but many attributes and methods are only known at the design stage, plus all the first steps you can add;
6) There are enough attributes and methods in the design phase, but their types and parameters are not enough.

5. attributes and Methods
A: There are two types of attributes:
. Common attribute: a variable or constant that exists in an object. A common property will store some meaningful values in the object.
. Derivative property: it is not stored in the system and calculated based on other information in the system.

6. Connections and links
Answer: 1) Join-for class
. Refers to the relationship in a straight line in the class diagram;
. The line can be horizontal or vertical;
. You can give a logical name on the link line to describe the link;
2) Link-For Objects
The relationship between two objects in the object graph;

7. Connection and diversity
Answer: 1) diversity shows the possibility that objects in one class can be associated with objects in another class;
2) In the class diagram, each class has only one rectangle, so the join determines how many objects of a class are linked to the objects of another class;
3) The end of the connection line is marked;
 
8. Value of diversity
Answer: 1) 2: Exactly two;
2) *: up to 0;
3) 5 .. 15: 5 to 15;
4) 2, 6: 2, 4, and 6;
5) 10 .. *: at least 10;
6) 0 .. 10: A maximum of 10;

9. Complex join
Answer: 1) The diversity mark "*" appears at both ends of the connection;
2) After you name all the joins in the class graph and allocate the diversity, it is time to review them and try to solve the complex joins. You can use a join class or a qualified join.

10. join class (similar to the index table in the database)
Answer: 1) This means that the join itself must be encoded as a class, which has a conflict-solving attribute;
2) this technology is used in the analysis phase to solve the many-to-many relationship;

11. Eligible connections
Answer: 1) attribute values can be used to solve many-to-many problems;
2) assign a unique property value;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.