We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

CS301 Data Structures Assignment No 02 Fall 2019 Solution & Discussion

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 1696

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

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.

 

http://bit.ly/vucodes (For Assignments, GDBs & Online Quizzes Solution)

http://bit.ly/papersvu (For Past Papers, Solved MCQs, Short Notes & More)

Click Here to Search (Looking For something at vustudents.ning.com?)

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

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 of Programming with Queue Data Structure.

 

For any query about the assignment, contact at CS301@vu.edu.pk

GOOD LUCK

 

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.

 

Details:

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

  1. userVUID
  2. userDetail

Structure Variables

Description

userVUID

It will store the student id e.g.

BC12345688

userDetail

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

Bilal (BSCS)

ArrQueue should implement following data members and member functions:

Data Members

Description

arr[arrLength]

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

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

rear

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

 

Methods

Description

enQue(X)

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”.

deQue()

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).

queLength()

Return size of Queue. (Not array size)

e.g. queue.queLength().

isEmpty()

Return TRUE if Queue is empty, FALSE otherwise.

isFull()

 

Return TRUE if Queue is full, FALSE otherwise.

showQue()

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.

 

Note:

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?

CS301-Assignment-2-Solution-idea-Fall-19

below link

CS301-Assignment-2-Solution-idea-Fall-19.docx

this solution is not correct

CS301 Assignment#02 Solution fall 2019

below link 

CS301_Assignmnet_2_Solution_Fall_2019_vustudents.ning.com.cpp

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 

RSS

Latest Activity

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

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

.