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

Draw the dependency diagram for the relation, Consider the subsequent relat...

Consider the subsequent relation   Professor (Pfcode, dept, head, time)   It is assumed that      (i) A professor can work in much more than one

The proliferation of object-oriented methods, The Proliferation of Object-O...

The Proliferation of Object-Oriented Methods The first few years of the 1990s saw blossoming of around fifty various object oriented methods. This proliferation is a sign of g

List the reg-no of vehicles owned in relational algebra, Given the followin...

Given the following relations Vehicle (Reg_no, make, colour) Person(eno, name, address) Owner(eno, reg_no) Write expressions in the relational algebra to answer the following

Explain b-tree, What is B-Tree? A B-tree eliminates the redundant stora...

What is B-Tree? A B-tree eliminates the redundant storage of search-key values .It permits search key values to appear only once.

Differance between unordered and ordered file, Differance between Unordered...

Differance between Unordered and ordered file ? Unordered file do no has any sequence although ordered file has arranged in a few sequence and data are assigned in ordered form

Security-data fragmentation, Security: Data not needed by local applicatio...

Security: Data not needed by local applications is not stored at the site, therefore no unnecessary security violations may exist. But how can we carry out fragmentation? Fragm

Job scheduling strategy, 1) Define a job scheduling strategy that will meet...

1) Define a job scheduling strategy that will meet business requirement of reporting availability by 6am CST for the following cubes? Show the job scheduling dependencies in a pict

Replication-design of distributed databases, Replication : It is definite a...

Replication : It is definite as a copy of a relation. Every replica is stored at a dissimilar site. The alternative to replication is to store only single copy of a relation which

BI, (a) Why did SAP introduce the extended star schema?

(a) Why did SAP introduce the extended star schema?

Explain the five levels of capability maturity models, Question 1 What is ...

Question 1 What is data mining? Write Data Mining applications Question 2 What is OLAP? Write the benefits of OLAP Question 3 What is Business Intelligence? Explai

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