Use inheritance as an implementation technique, Database Management System

Assignment Help:

Use inheritance as an implementation technique

when you are going to use inheritance as an implementation technique, you can achieve same goal in a safer way by making one class an attribute or associate of other class. In this way, one object could selectively invoke desired functions of another class, by using delegation rather which applying inheritance. 

A safer implementation of Stack will delegate to List class as shown in Figure. Every instance of Stack includes a private instance of List. Stack: push operation delegates to list by calling its last and add operations to add the element at the end of list, and the pop operation has a same implementation using last and remove operations. The ability to corrupt stack by adding or removing arbitrary elements is hidden from client of the Stack class.

 

1992_Alternative implementations of a Stack using inheritance.png


Related Discussions:- Use inheritance as an implementation technique

Explain the exec statement in sql, Explain the EXEC statement in SQL  A...

Explain the EXEC statement in SQL  Ans: All statements which start with EXEC SQL are embedded SQL database statements. High level languages such as C can be employed to write a

Define query language, Define query language?   A query is a statement ...

Define query language?   A query is a statement requesting the retrieval of information. The portion of DML that includes information retrieval is known as a query language.

Define multivalued dependency and 4nf, Define multivalued dependency and 4N...

Define multivalued dependency and 4NF.  Ans:  Multivalued Dependency - Assume R be a relation schema and let α ⊆ R and β ⊆ R. The multivalued dependency  α →→β   holds o

Name the three major database in oracle, Name the three major set of files ...

Name the three major set of files on disk that compose a database in Oracle. There are three main sets of files on disk that compose a database. All the files are binary. These

Obtain the house numbers street wise from database, For the relations answe...

For the relations answer the following queries in SQL Street (name, location, city) House (number, street_name) Lives (name, house_number) (i) Obtain the names of persons who liv

Binary relationships, One-to-one relationship: For every 1:1 relationshi...

One-to-one relationship: For every 1:1 relationship type R in the ER diagram including two entities E1 and E2 we take one of entities (say E1) preferably with total participatio

What are the different types of interfaces provided by dbms, Question 1 Su...

Question 1 Suppose the employee employee id, name, designation, salary, attendance and address of any employee has to be stored in a database. You can store these data in a sequen

Design of distributed databases, Design Of Distributed Databases: The dist...

Design Of Distributed Databases: The distributed databases are mainly relational at local level. So a local database schema is the similar as that of a centralised database design

Why were functional methods fashionable in early days, Why were functional ...

Why were functional methods fashionable in early days? These are inspired directly by computer architecture and thus popular among computer scientist in early days. The divisio

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