+2 votes
in Software Engineering by

1 Answer

+2 votes
selected by
Best answer
To make components reusable, you have to extend the application specific components to create more generic and therefore more reusable versions. For example, take a stack data structure which provides operations like initialize, push, pop.

Let us consider an example of digital global library for books. The library is divided into areas and an identifier that points to books in specific area. When ever the user search for book with area, the identifier is pushed onto a stack and popped from the stack. The top of the stack always refers to the book in the current area. But if user wants to view all the areas visited then it requires an additional stack operation that provides access to all the records. That means the pop operations has to be modified, when an item is popped from the stack it has to be added to a visited area list that can be displayed from the stack elements.

Related questions

Welcome to CPEN Talk
Solution-oriented students of computer engineering on one platform to get you that


Chuck Norris can write multi-threaded applications with a single thread.