9
Analysis and definition of classes Practice 1

Analysis and definition of classes Practice 1. ATD. Duties Abstract type of data defines a set of objects, which fully describes a set of operations

Embed Size (px)

Citation preview

Page 1: Analysis and definition of classes Practice 1. ATD. Duties  Abstract type of data defines a set of objects, which fully describes a set of operations

Analysis and definition of classes

Practice 1

Page 2: Analysis and definition of classes Practice 1. ATD. Duties  Abstract type of data defines a set of objects, which fully describes a set of operations

ATD. Duties

Abstract type of data defines a set of objects, which fully describes a set of operations on these objects. Thus, the abstract data type is entirely determined by the composition and terms of operations on objects.

Classic examples of abstract data types are stack, queue and list.

The duties of an object or a class are of three kinds: the duty to know and possess certain information, the obligation to carry out certain actions and provide an interface for them to call, duty to organize the interaction of other objects.

Page 3: Analysis and definition of classes Practice 1. ATD. Duties  Abstract type of data defines a set of objects, which fully describes a set of operations

Method of Abbot. Method of registered groups

Method of Abbot means studying the text descriptions of the problem with the purpose of allocation of candidates of classes. This method defines the set of rules of extraction of nouns from the text, the association of synonyms and exceptions unsuitable nouns (numerals, non-related to the problem concepts and others).

The method of registered groups is a modification of the original method of Abbott, it defines the extraction of entities in the structural design. It is also based on the allocation of nouns, but leaves this task to the discretion to analyst, which of them are relevant, irrelevant or fuzzy classes.

Page 4: Analysis and definition of classes Practice 1. ATD. Duties  Abstract type of data defines a set of objects, which fully describes a set of operations

CRC-method. Method of templates

The CRC method of cards (class - responsibilities – collaborators) aimed at the analysis of the interaction of objects for the implementation of some functions of the system. We formulate a number of duties and actions during future interaction. The method is used several tomes considering the key functions of the system. The result of the method are the description of the duties of all objects and their interaction, usually submitted in the form of cards.

Method of templates searches classes, allocated in other similar purpose systems.

Page 5: Analysis and definition of classes Practice 1. ATD. Duties  Abstract type of data defines a set of objects, which fully describes a set of operations

Task 1

Disk consists of a number of clusters. On the disk there are named folders, in which there are subfolders or named files. A list of files and folders is stored in a single cluster of a hard drive, data files are stored in several clusters. Define classes and relationships between them, using

abstract types of data (ATD) and the method of Abbot. Add some operations and attributes to existing classes in

order to have an opportunity to create, to delete folders and files, to read and write a data buffer from the defined position in a file.

Page 6: Analysis and definition of classes Practice 1. ATD. Duties  Abstract type of data defines a set of objects, which fully describes a set of operations

Task 2

The patient goes to the doctor to get a prescription for a medicine for his sickness. Define classes and build a model for the accounting system

of visits of doctors in polyclinics. Define classes and build a model for a program-organizer

software for visitors.

Page 7: Analysis and definition of classes Practice 1. ATD. Duties  Abstract type of data defines a set of objects, which fully describes a set of operations

Task 3

In the international standard for the evaluation of the quality of software facilities a quality is characterized by set of factors. At each of the stages of the development of software a factor describes a set of criteria. Each criterion is measured with the help of several metrics for different stages of the development. Define classes and build a model of the quality of software,

using the method of registered groups. Using a picture, define criteria and metrics of reliability for

the implementation phase of software development.

Page 8: Analysis and definition of classes Practice 1. ATD. Duties  Abstract type of data defines a set of objects, which fully describes a set of operations
Page 9: Analysis and definition of classes Practice 1. ATD. Duties  Abstract type of data defines a set of objects, which fully describes a set of operations

Task 4

Audio players consist of the manager of plug-ins; user interface, which handles user input; manager component that implements the basic functionality, and multimedia library. Define classes and relationships between them, using ATD and the method

of Abbot. Add the operations and attributes to the classes to load and power on / off

plug-ins. Check the description of the manager component, so that it appears

attended by the manager of network connections, and in the system as a whole it appears the server with the database of available plug-ins. The plugin manager can use the connection manager to connect to the server to check updates for installed plug-ins.

Specify that the result of the actions of the user are the events in the interface, and the plug-in can register itself as the handler for these events through plug-in manager.