Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

CS301 Data Structures Assignment No 02 Fall 2019 Solution & Discussion

Views: 2174

Replies to This Discussion

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

Students having same subject can start discussion here to solve assignment, GDB & Quiz and can clear their concepts until solution is provided. 


P.S:    Please always try to add the discussion in proper format title like “CS101 Assignment / GDB No 01 Solution & Discussion Due Date: ___________”

Then copy Questions from assignment file and paste in Discussion. (For Assignments, GDBs & Online Quizzes Solution) (For Past Papers, Solved MCQs, Short Notes & More)

Click Here to Search (Looking For something at

Click Here to Join (Our facebook study Group)

CS301 Data Structures Assignment 2 Solution & Discussion Fall 2019


Assignment No. 02
SEMESTER Fall 2019
CS301- Data Structures

 Total Marks: 20

 Due Date: 29-Nov, 2019


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.


The objective of this assignment is

o   To make you familiar of Programming with Queue Data Structure.


For any query about the assignment, contact at



Marks: 20 


Problem Statement:

You have to implement a Queue Data Structure for student’s admission applications in the university by using Array in C++ language. In which you have to create:

  1. A structure (using struct keyword) named Student.
  2. A class named ArrQueue.



Student structure must have two variables of type string (using string.h library) in it.

  1. userVUID
  2. userDetail

Structure Variables



It will store the student id e.g.



It will store user details as Name (Degree Program) e.g.

Bilal (BSCS)

ArrQueue should implement following data members and member functions:

Data Members



arr” is an array of type Student which will store queue students information in the array. While “arrLength” is the length of the array which is 5.


front variable will store the value of array index of first user in the queue.


rear variable will store the value of array index of last user in the queue.





Place X after the rear of the queue (If array have empty space).
e.g. queue.enQue(X).

You have to handle these cases for enQue().

  1. If queue is empty. Then add Student to Queue.
  2. If queue is full. Then show message:
    “Queue is full”.


Remove the student from front position in the queue and move all students forward in the queue. (If array is not empty).

e.g. queue.deQue().

You have to handle these cases for deQue().

  1. If queue is empty. Then show message at “Que is empty cannot remove students”.
  2. If queue is not empty, remove element from the queue.

Note: Removal of Students from Queue will be according to First In First Out (FiFO) Method (Means a student who comes to queue first will remove from the queue first then others).


Return size of Queue. (Not array size)

e.g. queue.queLength().


Return TRUE if Queue is empty, FALSE otherwise.



Return TRUE if Queue is full, FALSE otherwise.


Will show the Queue data as given in below screenshots (Detailed Output Screenshot).

e.g. queue.showQue().

(“X” denote “Student” structure Object means a student profile record while “queue” denotes and Object of the class “ArrQueue”.)

In the main() function you have to:

1.     Create an array of objects having size 5 and of type “Student” and store five student’s data in it.

2.     Make a queue and add all students in it by using for loop with enQue() method. Then show the array using showQue() method like given in “Main Output Screenshot”.

3.     Then you have to remove students from the queue according the following conditions e.g.

Your id is “BC12345687” then last digit is 7.

a.     If last digit is Even Number then remove first two students from the queue using for loop with deQue() method. There will be 3 remaining students in the queue out of 5 as we have removed two students.

For details see screenshots under “Main Output Screenshot” heading.

b.     If last digit is an Odd Number (e.g. in above id 7 is an odd number) then remove first one student form the queue using for loop with deQue() method. There will be 4 remaining students in the queue out of 5 as we have removed three students.

For details see screenshots under “Main Output Screenshot” heading.

4.     After that show queue data using showQueue() method as given in “Main Output Screenshot”.

5.     Last student data should be your own data and all above ids must be one less than your id number according to Detailed Output Screenshot.



If you will not follow variables, functions and class names as mentioned and explained in this file also your actual output under heading “Main Output Screenshot” is not according to “Detailed Output Screenshot” then you will get Zero marks.

Detailed Output Screenshot:


Just For Your Information.

Note: Last record must be your VU ID, Name and Degree Program.

Main Output Screenshot:

  1. For Students Id’s having Odd number in last of your id.
  2. For Students Id’s having Even number in last of your id.

Lectures Covered:  This assignment covers Lecture # 1-14.

Deadline:           Your assignment must be uploaded/submitted at or before 29-Nov, 2019.

kisi ky pas correct solution hy?


below link


this solution is not correct

CS301 Assignment#02 Solution fall 2019

below link

is m b error a ra h

sary solution m error a ra h

nahi sahi hai meray pass code provide your email id

salam , i also need correct solution , today's last date 


© 2022   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service