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

Discuss the count function, Discuss the count function? The COUNT funct...

Discuss the count function? The COUNT function used returns the number of tuples or values fixed in a query. The count function comprises two types of syntax: (1) COUNT (*)

Logical operators-logical operators, Logical Operators Rules of Preced...

Logical Operators Rules of Precedence: Order evaluated Operator 1 All comparison operators 2

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

Recovery concepts, recovey techniques based on deferred update and immediat...

recovey techniques based on deferred update and immediate update

What is database trigger, What is database Trigger? A database trigger ...

What is database Trigger? A database trigger is a PL/SQL block that can explained to automatically execute for insert, update, and delete statements against a table. The trigge

Er model, explain the steps for reduction of er model into relational model...

explain the steps for reduction of er model into relational model?

Define the one-way associations, One-way Associations When an associat...

One-way Associations When an association is traversed only in the one direction, then it is implemented as a pointer i.e.an attribute which contains an object reference. If mu

Back up files, what is the importance of back up files

what is the importance of back up files

Using relational algebra which query finds customers, Using Relational Alge...

Using Relational Algebra which query finds customers, who have a balance of over 1000 ? Using Relational Algebra Π Customer_name( σ balance >1000(Deposit)) is query to find cu

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