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

Create a table to record a passengers information, Given the following rela...

Given the following relations TRAIN (NAME, START, DEST) TICKET (PNRNO., START, DEST, FARE) PASSENGER (NAME, ADDRESS, PNRNO.) Write SQL expressions for the following queries: No

Determine that the checkpoints are a part of, 1. Determine that the Checkpo...

1. Determine that the Checkpoints are a part of  Ans: Checkpoints are a part of Recovery measures

Explain candidate key, Explain Candidate key? Candidate Key - A candi...

Explain Candidate key? Candidate Key - A candidate key is a minimal superkey, that can be used to uniquely identify a tuple in the relation.

What is meant by physical blocks, What is meant by Physical blocks? The...

What is meant by Physical blocks? The input and output operations are completed in block units. The blocks residing on the disk are referred to as physical blocks.

Describe the capabilities offered via mysql client apis, Describe the capab...

Describe the capabilities offered via MySQL client APIs? . • Checking for errors. . • Connecting to the MySQL server, selecting a database, disconnecting from the server

What is a database, What is a database? Database - Basically in simpl...

What is a database? Database - Basically in simple terms A database is a collection of inter related data and/or information stored so which it is available to several users

ER diagram, #question. acompani datdbase needs to store information about e...

#question. acompani datdbase needs to store information about employees (identified by a social security number,with salary and phone as attributes) and departments (identified by

Relational algebra operators, Question 1 Draw a Data Flow Diagram for a...

Question 1 Draw a Data Flow Diagram for a University scenario Question 2 Discuss the following with suitable examples Relational Algebra Operators Database Pla

Keys, it can be possible to create any table without primary key

it can be possible to create any table without primary key

Extended star schema, Why did SAP introduce the extended star schema? Expla...

Why did SAP introduce the extended star schema? Explain why it is reported to be better than the traditional schema model?

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