How to rearrange classes and operations, Database Management System

Assignment Help:

Rearrange Classes and Operations

Sometimes, the similar operation is defined across different classes and can easily be inherited from a familiar ancestor, but more often operations in several classes are similar, but not the same. By slightly altering the definitions of operations or classes, the operations could often be made to match so that they could be covered by a single inherited operation. The following types of adjustments can be made to increase chance of inheritance:

  • We will find that some operations can have fewer arguments than others. The missing arguments can be added but normally ignored. Such as, a draw operation on a monochromatic display does not require a colour parameter, but parameter can be accepted and ignored for uniformity with colour displays.
  • Some operations can have fewer arguments since they are special cases of more common arguments. In this case, you can implement special operations by calling general operation with appropriate parameter values. Such as, appending an element to list is a special case of inserting an element; here the insert point just follows the last element.
  • Same attributes in different classes can have different names. Give attributes the same name and move them to a common ancestor class, then operations that access attributes will match better. Also, watch for same operations with different names. You should note that a reliable naming strategy is significant to avoid hiding similarities.
  • An operation can be defined on many different classes in a group, but be undefined on other classes. Define it on a common ancestor class and declare it as a no-op on classes which do not care about it. For instance, in OMTool the begin-edit operation places some figures, for example class boxes, in a special draw mode to authorize rapid resizing while the text in them is being edited. Other figures do not have special draw mode, so begin-edit operation on these classes has no effect.

 


Related Discussions:- How to rearrange classes and operations

What is the need for triggers, What is the need for triggers? Triggers ...

What is the need for triggers? Triggers are useful mechanisms for alerting humans or for starting particular tasks automatically when particular conditions are met.

Database problem in wordpress, Project Description: I am having a random...

Project Description: I am having a random problem with my Wordpress site. If I click on "Publish" and "Add new", it takes me to a 404 page not found of /wp-admin/post.php (th

Exclusive lock, Exclusive lock It is asked for by a transaction on...

Exclusive lock It is asked for by a transaction on a data item that it wants to update. No other transaction can put either a shared lock or an exclusive lock on a dat

Limitations of file based system, Limitations of File Based System The...

Limitations of File Based System The file-based system has some limitations. The limitations are listed as follows: Isolation and separation of data: When the data is

Compare the two log based recovery schemes, Compare the two log-based recov...

Compare the two log-based recovery schemes in terms of ease of implementation and overhead cost.    Ans:  There are two types of log based recovery techniques: deferred update

Define the immediate update, Define the Immediate Update The immediate...

Define the Immediate Update The immediate update methods may apply changes to the database on disk before the transaction arrives a successful conclusion. Though, these change

What create when a primary key combined with a foreign key, What will be cr...

What will be create when a primary key if combined with a foreign key? A primary key if combined with a foreign key it creates Parent-Child relationship between the tables that

Illustrate different types of locks in sql server, Illustrate different typ...

Illustrate different types of Locks in SQL Server. There are three kinds of locks in SQL Server i.) Shared locks - These are used for operations which don't allow any update

Evaluate the bulleted list of information-related items, Critically evaluat...

Critically evaluate the bulleted list of information-related items in this case study. How are each contradictory to the notion of being an information-literate knowledge worker?

Related Rates, All edges of a cube are expanding at a rate of 6 centimeters...

All edges of a cube are expanding at a rate of 6 centimeters per second. How fast is the surface area changing when each edge is (a) 2 centimeters and (b) 10 centimeters?

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd