CS301 - Data Structures Assignment No. 1 Solution Fall 2018
#1

Assignment No. 01 (Graded)
SEMESTER Fall 2018
CS301- Data Structures
[b]Total Marks: 20
Due Date:  10 /12 /18
 
[i][u]Instructions

Please read the following instructions carefully before solving & submitting assignment:
[/u][/i][/b]
It should be clear that your assignment will not get any credit (zero marks) if:

o[font=Times New Roman]       [/font]The assignment is submitted after due date.

o[font=Times New Roman]       [/font]The submitted assignment is other than .cpp file.

o[font=Times New Roman]       [/font]The submitted assignment does NOT open or file is corrupted.

o[font=Times New Roman]       [/font]The assignment is copied (from other student or ditto copy from handouts or internet).
[b][i][u]Uploading instructions
o[font=Times New Roman]  [/font]For clarity and simplicity, you are required to Upload/Submit only .cpp file.
Objective
[/u][/i][/b]
The objective of this assignment is:

o[font=Times New Roman]  [/font]To make you understand the different traversal forms of a Binary Search Tree data structure.

 
[b]For any query about the assignment, contact at cs301@vu.edu.pk
[/b]
GOOD LUCK
[b] 
Marks: 20 
[/b]

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[font=Times New Roman]       [/font]The assignment is submitted after due date.
o[font=Times New Roman]       [/font]The submitted assignment is other than .cpp file.
o[font=Times New Roman]       [/font]The submitted assignment does NOT open or file is corrupted.
o[font=Times New Roman]       [/font]The assignment is copied (from other student or ditto copy from handouts or internet).
Uploading instructions
o[font=Times New Roman]  [/font]For clarity and simplicity, you are required to Upload/Submit only .cpp file.
Objective
The objective of this assignment is:
o[font=Times New Roman]  [/font]To make you understand the different traversal forms of a Binary Search Tree data structure.
 
For any query about the assignment, contact at cs301@vu.edu.pk
GOOD LUCK
 
Marks: 20 


 
Binary Search tree is the most efficient data structure for solving different problems. Construction of BST (Binary Search Tree) depends on the order in which data is inserted into the tree. For building a Binary Search Tree, data should be inserted into a tree in a way that nodes with smaller data values appears on left side and larger node values appears on right side of the root node.
Write a menu based system program in C++ that will allow you to:
Enter Employee data in BST
buildBST()
Post order traversal of all the Employee data
postOrder()
Show data in ascending order
asscendingOrder()
 
Take the following attributes of an Employee from the user:
empId, empNname, empSalary
You have to implement the above scenario using BST on the basis of Employee Id. i.e. if the Id of the Employee is lesser than the root node then enter the next Employee data in the left child otherwise in right child.
Note:
·[font=Times New Roman]        [/font]BST will implement using Linked List.
·[font=Times New Roman]        [/font]Program will not allow entering duplicate employee id.
·[font=Times New Roman]        [/font]Design the program in a way that the user will be able to enter maximum 10 records.
·[font=Times New Roman]        [/font]Take empId, empName, empSalary from the user. At least 4 students record should be already entered (hard coded records).
You will use following already entered Employees data (hard coded records).
Emp Id
Name
EmpSalary
32
Raza
3000
56
Sajjad
25000
93
Rabia
19230
5
Sehar
24000
10
Ali
22200
 
 
 
 
 
 
Solution Guidelines:
·[font=Times New Roman]        [/font]You will use buildBST() method to build Binary Search Tree from the above given data.
·[font=Times New Roman]        [/font]Use the ascendingOredr() method to show the output in ascending order. With respect to empId.
·[font=Times New Roman]        [/font]Use postOrder() method to traverse the records in post-order.
 
 
Sample output 1:
[img=624x582]file:///C:/Users/Hussain/AppData/Local/Temp/OICE_FB4585C0-7A2D-4F07-8CF2-6EBC07A6E41B.0/msohtmlclip1/01/clip_image002.jpg[/img]

Sample output 2:
[img=624x662]file:///C:/Users/Hussain/AppData/Local/Temp/OICE_FB4585C0-7A2D-4F07-8CF2-6EBC07A6E41B.0/msohtmlclip1/01/clip_image004.jpg[/img]
Reply
#2

https://buysildenshop.com/ - Viagra
Reply
#3

<a href=https://buystromectolon.com/>stromectol ivermectin</a>
Reply
#4

Viagra Dosis Maxima Diaria
Reply
#5

https://buyplaquenilcv.com/ - hydroxychloroquine for sale over the counter
Reply
#6

Ciprofloxacin And Amoxicillin Taken Togather
Reply
#7

http://buyplaquenilcv.com/ - Plaquenil
Reply
#8

Achat Cialis Particulier
Reply
#9

http://buyplaquenilcv.com/ - how does plaquenil work for lupus
Reply
#10

Karela
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by bridge12
09-18-2021, 04:32 PM
Last Post by bontainia
09-16-2021, 04:25 AM
Last Post by Angry Bird
08-16-2018, 12:26 AM



Users browsing this thread: bontainia, Meteshoms, reewmella, 1 Guest(s)