How Software Gets Done  


Login

Software Buyers
Request bids
Search coders
My Buyer Account
Buyer help
Buyer articles
Buyer FAQ
Latest news
 
Software Coders
Newest open work
Browse all work
Search all work
My Coder Account
Coder help
Coder articles
Coder FAQ
Latest news
 
Affiliates
My Affiliate Account
Affiliate help
Affiliate FAQ
Latest news
 
Newest Bid Requests.
Read a Usenet Group on a web page
By corbing on Jul 10
Max Bid: Open to fair suggestions


Windows Service - Loads background Web page
By ironcladsecure on Jul 10
Max Bid: Open to fair suggestions


Cobol conversion
By 2good2 on Jul 10
Max Bid: Open to fair suggestions


Non-Profit web site backend DB
By stnwall on Jul 10
Max Bid: Open to fair suggestions


Professional Realty WebSite (<a href=" cool flash design needed FAST!(repost)
By adrianbye on Jul 10
Max Bid: Open to fair suggestions


Click here to put this ticker on your own site and/or get live RSS newsfeeds

Open Work Categories.
Database 
(138 open)
   Access 
(52 open)
   MySQL 
(83 open)
   Oracle 
(9 open)
   SQL Server 
(49 open)
   Other DB 
(17 open)
Documentation / Tech Writing 
(14 open)
Data Entry 
(21 open)
Game Development 
(24 open)
Graphics / Art / Music 
(46 open)
   Graphics 
(52 open)
     Adobe AfterEffects 
(1 open)
     Adobe Photoshop 
(15 open)
     Adobe Premiere 
(3 open)
     3d Animation 
(12 open)
   Art (Misc.) 
(19 open)
   Music 
(11 open)
   3d Modeling 
(13 open)
Language Specific 
(91 open)
   ASP 
(55 open)
   ASP .NET 
(35 open)
   C# 
(39 open)
   C++ / C 
(103 open)
   Carbon (Mac OS) 
(2 open)
   Cocoa / Obj-C 
(2 open)
   Cold Fusion 
(11 open)
   Delphi 
(26 open)
   Java 
(56 open)
   JSP 
(7 open)
   Perl 
(39 open)
   PHP 
(85 open)
   XML/XSL 
(29 open)
   Visual Basic 
(132 open)
   Visual Basic .Net 
(52 open)
   Other 
(53 open)
Misc 
(29 open)
   CAD 
(3 open)
MultiMedia 
(36 open)
   Video Editing 
(4 open)
Network 
(43 open)
   Network Design 
(11 open)
   Network Implementation 
(13 open)
Platforms 
(75 open)
   Windows 
(159 open)
     MS Exchange 
(6 open)
     MS Office 
(12 open)
     Other 
(15 open)
   Darwin 
(1 open)
   Internet Browser 
(40 open)
   Linux 
(60 open)
   UNIX 
(27 open)
   Hand Held/PDA Programming 
(8 open)
Requirements 
(13 open)
Security 
(27 open)
Testing / Quality Assurance 
(16 open)
Web 
(145 open)
   Page Design 
(77 open)
   Flash 
(36 open)
   Web Services 
(70 open)
   Web (Other) 
(73 open)
Training 
(12 open)
   Computer Based 
(11 open)
Other
 
Other Sites

Download the free Rent A Coder IE toolbar!
 
Show Bid Request

linked lists
Bid Request Id: 21316
Bookmark in my 'To Do' list
Posted by: zak_12000 (1 ratings)
(Software buyer rating 10)
Non-action Ratio: Very Good - 0.00%
Buyer Security Verifications: Good
Approved on: Jul 10, 2002
3:36:59 PM EDT
Bidding Closes: Jul 12, 2002 EDT
Viewed (by coders): 55 times
Deadline: 7/12/2002
TIME EXPIRED
Phase:
100% of work completed and accepted. Coder has been paid.
Max Accepted Bid: Bidding is closed
Project Type: Personal Project / Homework Help
Bidding Type: Open Auction
Categories: C++ / C
Enter chat room for this bid request
(1 active users at Jul 10, 2003 8:18:46 PM EDT)

Description:
1. generate a linked list based on the folwng program 2. Add two member functions to the List class performing two separate sorting operations. 3. Use the functions in step (2) to sort the linked list of step (1). /* Object-Oriented Linked List This program defines a linked list and inserts 10 elements in the list. There are a number of functions such as Insert, Delete, Print, and Length, which we are already provided with. We are asked to add the following functions: Sum: adds up the numbers in the linked list. Average: finds the average of the numers in the list. Reverse: reverses the order of the elements in the linked list. Swap: swaps the contents of two cells */ #include <iostream.h> //typedef int bool; // if your compiler doesn't support boolean type uncomment this typedef int ListElement; struct cell // the basic building block of a linked list { ListElement item; // the data in this cell struct cell *next; // the pointer to link to the next cell }; typedef struct cell* cellptr; // define the type of the pointer to a cell class List { private: cellptr header; // the header pointer of the linked list public: List(); ~List(); bool IsListEmpty(); int Length(); bool ListInsert(ListElement); bool ListDelete(ListElement); cellptr Retrieve(ListElement); void PrintList(); int SumList(); float AverageList(); bool Swap (cellptr p1, cellptr p2); bool Reverse (); }; List::List():header(NULL) { }; bool List::IsListEmpty() { return(header == NULL); }; List::~List() { cellptr temp = header; while(temp!=NULL) { header = temp->next; temp->next = NULL; delete temp; temp = header; } header = NULL; }; int List::Length() { cellptr temp = header; int counter=0; while(temp!=NULL) { counter++; temp=temp->next; } return(counter); }; bool List::ListInsert(ListElement n) { cellptr temp = new struct cell; if(temp==NULL) { cout << "Not enough memory!" << endl; return(0); } else { temp->item=n; temp->next=header; header=temp; return(1); } } continues on next page

Deliverables:
bool List::ListDelete(ListElement n) { cellptr temp1 = header, temp2; if(temp1==NULL) { cout << "Empty list!" << endl; return(0); } else if(temp1 -> item==n) { header=temp1 -> next; temp1->next=NULL; delete temp1; return(1); } else { temp2=temp1; temp1=temp1->next; while((temp1 != NULL)&&(temp1 -> item != n)) { temp2=temp1; temp1=temp1->next; } if(temp1==NULL) { cout << "Element " << n << " not found!" << endl; return(0); } else { temp2->next = temp1->next; temp1->next=NULL; delete temp1; return(1); } } } // The retrieve function locates a list element in the list and returns // the pointer to the element. If the element is not found it returns NULL. cellptr List::Retrieve(ListElement n) { cellptr temp = header; if(temp==NULL) { cout << "Empty list!" << endl; return(NULL); } else { while((temp != NULL)&&(temp -> item != n)) temp=temp->next; if(temp==NULL) { cout << "Element " << n << " not found!" << endl; return(NULL); } else return(temp); } } void List::PrintList() { cellptr temp = header; cout << "Showing the list:" << endl; while(temp!=NULL) { cout << temp -> item << endl; temp=temp->next; } } //Finds the sum of elements in the linked list int List::SumList() { int sum; cellptr temp = header; sum = 0; while(temp != NULL) { sum = sum + temp -> item; temp = temp -> next; } cout<< "The sum of the elements in the linked list is: "; cout<<sum<<endl; return sum; } //Finds the average of elements in the linked list float List::AverageList() { float Avg; Avg = float (SumList())/Length(); cout<<"The list average is :"<<Avg<<endl; return Avg; } //Swaps the element pointed by p1 with that pointed by p2 bool List::Swap ( cellptr p1, cellptr p2) { cellptr temp = header; int temporary; temporary = p2 -> item; p2 -> item = p1 -> item; p1 -> item = temporary; return 1; } //Reverses the elements in the linked list bool List::Reverse () { cellptr temp = header; int size = Length(), i; for (i=0; i<size/2; i++) { Swap(Retrieve(i), Retrieve(size-1-i)); temp = temp ->next; } return 1; } main() { List l; for(int i=0; i<10; i++) l.ListInsert(i); l.PrintList(); /*l.ListDelete(5); l.ListDelete(9); l.ListDelete(11); l.ListInsert(300); l.ListInsert(101); l.PrintList(); */ //Finds the sum of elements in the linked list l.SumList(); l.PrintList(); //Finds the average of the elements in the linked list l.AverageList(); l.PrintList(); //Reverses the elements in the linked list cout<<"Here is the reversed list - "<<endl; l.Reverse(); l.PrintList(); //Swaps the fifth element with the 7th element cout<<"Here is the list when elements 5 and 7 are swapped - "<<endl; l.Swap ( l.Retrieve (5), l.Retrieve (7)); l.PrintList(); } /* Showing the list: 0 1 2 3 4 5 6 7 8 9 Here is the list when elements 5 and 7 are swapped - Showing the list: 0 1 2 3 4 7 6 5 8 9 */ temp->next=header

Platform:
win win 2000 or win 95

Must be 100% finished and received by buyer on:
Jul 12, 2002 EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.


Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements. We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation. If you notice a violation please help out the site and report it. Thanks for your help.
 
Bidding/Comments:
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests.

See all rejected bids (and all comments)
Name   Bid Amount 
 
Date   Coder Rating  
This bid was accepted by the buyer!
Muresan Robert
(67 ratings)
in Ideciu de Sus, Jud. Mures
Romania
Bid id: 234,196
 
$7 (USD) Jul 10, 2002
4:30:57 PM EDT
 8.51
(Superb)
   
Can deliver it to you in a few hours as i already have it implemented. I am a part time computer science teacher at my university.
I will give you clean, error free and well commented source code.
 




Quick Bid Request Search
 Advanced Search
Newest Open Work
Latest News  
Credentials


 

 
Rent A Coder upholds the rigorous business practices required to be both a BBB member and Square Trade vendor.
  • All customer issues addressed within 2 days
  • Openly disclosed pricing and return policies
  • Participation in mediation at buyer request
  • Superior selling track record
This site is verified through its parent company, Exhedra Solutions, Inc.
 
Top Coders.

Anuj Gakhar
Rated a 9.98 on 100 jobs 
Securenext
Rated a 9.96 on 109 jobs 
Buddies
Rated a 9.82 on 80 jobs 
Andrei Remenchuk
Rated a 10 on 13 jobs 
Codman
Rated a 9.97 on 149 jobs 
Michael Sharp
Rated a 9.97 on 181 jobs 
D-N-S
Rated a 9.93 on 37 jobs 
markesh
Rated a 10 on 22 jobs 
teleCODERS
Rated a 9.93 on 67 jobs 
Tometa Software, Inc.
Rated a 10 on 10 jobs 

See all top coders...

(What makes a top coder?)

Top Exam Scorers

 
Other
Rent A Coder is PayPal verified through its parent company, Exhedra Solutions, Inc.

Created in partnership with:

 

Affiliate Sites
Latest News | About Us | Kudos | Feedback/Contact    Affiliates | Advertise    Privacy | Legal

Copyright © 2001, Exhedra Solutions, Inc. All rights reserved.
By using this site you agree to its Terms and Conditions.
"Rent A Coder" (tm), "Safe Project Escrow" (tm) and "How Software Gets Done" (tm)
are trademarks of Exhedra Solutions, Inc.