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.
Don’t wait for grace day. Grace day is only given if there is problem on due date. Submit your solution within due date.
Note that no assignment will be accepted through email if there is any problem on grace day
Note: Use ONLY Dev‐C++ IDE.
Objective
The objective of this assignment is
o
To make you familiar with linked list data structure and programming techniques to implement linked list.
For any query about the assignment, contact at cs301@vu.edu.pk
GOOD LUCK
Marks: 20


We know that in linked list we have one value and one pointer (to hold the memory address of next node). Note that it is not compulsory to have only one value. There can be more than one value in one node but pointer will remain one.
Write a C++ program to implement linked list data structure. In this problem every node should have six values, the name of node and a pointer. Your program should prompt the user to enter total number of nodes in the list. After this give the name to node and save 6 different values in node. Process should be repeated for each node.
After entering values of all the nodes, sum the values in each node and sort the list in ascending order (on the basis of sum calculated in each node) i.e. node with smallest sum comes first and node with largest sum comes
last.
Note: Values within a single node should not duplicate. If a user tries to enter any duplicate value WITHIN A NODE then show a warning message and ask user to enter value again.
The diagram given below is showing the sorted list.

Solution Guidelines:
1.
First understand the code given in handouts about linked list.
2.
To save six different values in one node you can use array as data member of Node class.
3.
Get the sum of six values and on comparison of sum of different nodes sort the list.
4.
To get the idea about exact output of program, see Demo.wmv file attached with assignment file.
Lectures Covered: This assignment covers Lecture # 1‐5
Deadline: Your assignment must be uploaded / submitted on / before, April 22, 2013.

Tags: 22/4/2013, assignment, cs301data, date, due, structure1st

Views: 3939

Attachments:

Replies to This Discussion

All students kindly discuss here about assignment..and share your views..

sweet apko assignment ki smjh ai mjhy to kuch smjh nai a rhi .

lecture no 3 and 4 very important for this assignment.

main nay tu assignment solve bi kar li hay

bhai solv kar li hai to share kar dain na plzzzzzzz.

A linked list is a popular data structure to store data in sequential order. Meanwhile, linked list structure allow following operations which overcomes limitation of array: for example

1. Retrieve an element from list.
2. Insert a new element to the list.
3. Delete an element from the list.
4. Find how many elements are in the list.
5. Find a specific element is in the list.
6. Find if this list is empty.

yaar jub banay logo code to kuch samaj nahi ata, plz help me, kal assembly ki bhi assignment aa jay gi

follow solution guidelines and try to make solution

yes i m trying...

i think is myn loop chalaen gy jiss myn new node create ho gi

program to C++ k jysa hi ho ga r jo handout myn program hy us sy kuch help mil rai hy

1 to 5 lectures complete karin then khud say bnany ki try karin, just solution ka wait mat karin, try karin k solutionn finder ki bajaeay solution provider banain.

RSS

SPONSORED LINKS

Like Us on Facebook

SPONSORED LINKS

Badge

Loading…

© 2014   Created by Irfan Khan*^Mscs*Admin^*.   Powered by

Badges  |  Report an Issue  |  Terms of Service