مشكلتي اني اعرف ابرمج اذا فهمت فكرة السؤال لكن انا مو فاهم الفكره احد يقدر يساعدني ويفرج كربتي
الاسئله هي كاالتالي اتوقع والله اعلم ان السؤال الاول والرابع مرتبطين والباقيه مستقله
501243-3 Fall 2012 Assignment # 3
Linked Lists
__________________________________________________ ________
1. A library wants to manage its books with a computer program. A book is characterized by the author, the title and the ISBN number. Write down a suitable node struct for this case.
2. Let LIST be a linked list in memory. Write a procedure which
(a) Finds the number "NUM" of times a given "ITEM" occurs in LIST.
(b) Finds the number "NUM" of nonzero elements in LIST.
© Adds a given value "K" to each element in LIST.
3. Show the results (draw a picture of the linked list similar to what is on the slides) of the following code (assuming p, q, and r are node pointers).
Node* p = new Node
p->item = "ABC"
p->next = new Node
q = p->next
q->item = "abc"
q->next = NULL
r = new Node
r->item = "xyz"
r->next = q
p->next = r
4. write a complete c++ program which performs the following tasks:
(a) Implement the struct mentioned in question1.
(b) Insert a user supplied node.
© Search the list for a book by its ISBN number.
(d) Delete a specific book node.
(e) Count the number of books in the list.
حلي هو
struct BOOK {
string authr , Tital ;
int ISBN;
BOOK * next ;
} ;
صح ولااااا