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

What is difference between truncate and delete, What is difference between ...

What is difference between TRUNCATE and DELETE? - Truncate can't be rolled back whereas Delete can be. - Truncate keeps the lock on table whereas Delete keeps the lock on ea

Difference among a primary index and a secondary index, What is the differe...

What is the difference among a primary index and a secondary index? Primary Index: A primary index is an ordered file whose records are of fixed length along with two fields.

Difference between operating system and database security, Difference betwe...

Difference between Operating System and Database Security Security within the operating system can be executed at various levels ranging from passwords for access to system, t

Database, . Ashutosh Dubey who is the director of Gyan Gurukul want a three...

. Ashutosh Dubey who is the director of Gyan Gurukul want a three-level schema architecture for the Gyan Gurukul Company that provide better security also design a data abstraction

Explain composite attribute in sql, Explain Composite attribute in SQL ? ...

Explain Composite attribute in SQL ? Composite attribute: A composite attribute has many components, each of that is atomic or composite.

What is entity in dbms, What is entity in DBMS? Entity: A DBMS entity i...

What is entity in DBMS? Entity: A DBMS entity is either a thing in the modelled world or a drawing element in an ERD.

What is storage manager, What is storage manager?  A  storage  manager ...

What is storage manager?  A  storage  manager  is  a  program  module  that  gives  the  interface  between the Low level data  kept in a database and the application programs

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