Assignment DS
Assignment DS
ASSISGNMENT – 1
DATA STRUCTURES THROUGH C++
1. What is the difference between class and struct? Write a program to illustrate the
difference.
2. Take a class of cricketers of Indian cricket team. What would be the data members and
function members of this class? Which of them would you like to keep as private and
public justify your answer?
4. Differentiate between private and public functions. Give an example to illustrate them.
6. Define a supplier class. Assume that the items supplied by any given supplier are
different and varying in number. Use dynamic memory allocation in the constructor
function to achieve the solution.
7. What is a Binary Tree? How to Represent a Binary Tree? Explain DFS Traversing
techniques.
8. What is Threaded binary Tree? Explain with an example and draw the diagram.
9. What is a Dictionary? Write Abstract Data type for Dictionary. Explain about SkipList
and write advantages of it over linear list representation.
10. What is an Abstract Class and Give and Example class – No program required
11. Explain about Inheritance with neat diagrams. Write a C++ program to create classes
Person, Stream, Arts, Commerce, Science, Engineering and Student. A student object
will have multiple inheritances from person and either Arts, Commerce, Science,
Engineering classes. In turn these classes get inherited from a stream class. Write
functions for registration, examination result and grade to the students.
###