Assignment No. 01
Semester Fall 2019
CS301- Data Structures Total Marks: 20
Due Date : 18-Nov-2019
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit (zero marks) if:
o The assignment is submitted after due date.
o The submitted code does NOT compile.
o The submitted assignment is other than .CPP file.
o The submitted assignment does NOT open or file is corrupted.
o The assignment is copied (from other student or ditto copy from handouts or internet).
Uploading instructions
For clarity and simplicity, You are required to Upload/Submit only ONE .CPP file.
Note: Use ONLY Dev-C++ IDE.
Objective
The objective of this assignment is
o To make you familiar with implementing the Doubly Linked List data structure in C++ programming language.
For any query about the assignment, contact at [email protected]
GOOD LUCK
Marks: 20
Problem Statement:
You have to implement a Double Linked List in C++ language in which you have to create a structure and two classes as given below:
-
A structure named as “StudentDetail” by using struct keyword.
StudentDetail structure should consist of following data members of type “string”.
name
vuid
-
A node class named as “Node” by using class keyword.
Node class will have following data members and member functions:

(“X” denotes StudentDetail variable means the student details and “Y” denotes the data value of the node).
-
A doubly linked list class named as “DoublyLinkedList” by using class keyword.
DoublyLinkedList class will have following data members and member functions:

Detailed description of member functions of DoublyLinkList class:
-
addAtBegining(X): To add the node at the beginning of the doubly linked list class.

-
addAtEnd(X): To add the node at the End of the doubly linked list class.

-
delNode(): To delete a node pointed by current pointer in the doubly linked list.

-
display():To display all student details in doubly linked list.
(“X” denote Node to add in the doubly linked list).
In the main ( ) function you have to do the following:
-
Create two objects of type StudentDetail at the Beginning of the doubly linked list class using addATBegining (X) method of DoublyLinkedList and use display() method to display doubly linked list.
Note that first object should contain your own VU ID and your own name otherwise you will get zero marks.
-
Create one objects of type StudentDetail at the End of the doubly linked list class using addAtEnd (X) method of DoublyLinkedList and use display() method to display doubly linked list.
-
Delete current node of the doubly linked list and use display() method to display doubly linked list.
-
Display doubly linked list after calling each functions.
Detailed Output Screenshot:

Lectures Covered: This assignment covers Lecture # 1-8.
Deadline: Your assignment must be uploaded/submitted at or before 18-Nov-2019.