Show Bid Request
queue libraries
Bid Request Id: 11082
|
|
|
Posted by: |
julias (2 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Above Average - 25.00%
|
Buyer Security Verifications: |
Unverified
|
Approved on: |
Mar 17, 2002 6:02:44 PM EDT
|
Bidding Closes: |
Mar 31, 2002 6:08:54 PM EDT
|
Viewed (by coders): |
338 times
|
Deadline: |
3/20/2002
TIME EXPIRED
|
|
|
|
Description:
contd... All your classes should have separate header (.h) files and separate implementation files.
Part of your assignment is also to write a Makefile to compile your program correctly. You can assume that the main file using your program is always going to be main.C. The Makefile should have three different targets that build the program differently:
normal - build a normal executable just including the library code into the compilation. This is the way you have been doing it until now.
static - build a static source library archive, (.a) file, for your library and link it with the provided main.C.
shared - build a shared object library, (.so) file, for your library and link it with the provided main.C.
Make sure that all your operators and function calls match exactly the specifications. Since our main program will be making the calls they will have to match otherwise they will not work.
The provided sample main is only a sample and is not a complete test case by any means.
You must call your library implementation file queue.C. A library header file containing the class definition and the prototypes for your functions must be in queue.h.
Deliverables: In this assignment you will design and code the functions for a library of queues. Your library will create and perform several useful functions on queues. You will implement this library with a class. The name of your class MUST be queue.
You are free to choose how to implement this library, so long as it matches the specifications given. Note that you are writing the library ONLY. Your code will not have a main. Here is a sample main.C. Do not submit this file. Your library will be tested with this main, as well as many others.
The elements in the queue you will be creating are integers. A queue can contain any number integers, or none at all. The order of integers in the queue is important. Also, a queue can contain many instances of a number. The queues are FIFO queues. This means that the first elements in the queue are the first ones to be removed from the queue.
Your library must follow these specifications:
Allow user to create objects of type queue, both empty and nonempty. Format: queue data; /* Empty queue */
Format: queue data(A, 5); /* A is an int[], 5 is the number of elements in A to add to data in the same order they appear in the array. So the elements added would be A[0]..A[4]. There will always be enough values in the array */
Allow copying of a queue to an other one of two ways: copy constructor: queue * qp = new queue(data);
or operator: queue q = data;
Allow values in a queue to be added or removed Format: data.push(A, 2); /* A is an int[], 2 is the number of elements to add to the queue data from A. Same as above A[0]..A[1] would be added to the end of the queue data. */
Format: data.pop(2); /* 2 is the number of elements to remove from the beginning of the queue data. */
Allow comparison operations on objects of type queue The following must be supported:
Format: (data and test are of type queue ) if (data == test) ...
Note: Comparisons on queues works in the following way:
A B : The elements of queue A match exactly the elements of queue B, including the order of the elements.
A B : The elements of queue A do not exactly match the elements of queue B, may differ only in order of the elements.
A B : Every element in queue A is in queue B. Queue B might contain elements not in queue A.
A B : Every element in queue A is in queue B. Queue B must contain additional elements not found in A.
Allow cout of a queue (Do not just printout numbers, print the data in the order from oldest to newest separated with a comma, i.e. 1,2,3 would mean that 1 is the next to be removed and 3 was the last to have been added) Format: cout ``The content of the queue is '' data endl; Implement the following additional operators:
queue union C = A + B. C contains the elements queue A, followed by the elements in queue B.
Self assignment union A += B. Since we have + and = operators += will not be hard to implement.
queue intersection C = A && B. C contains the elements that are contained in both queues. (multiple appearances of an element only if there are multiple appearances in both queues.)
queue shuffle C = A * B. C contains only elements of queue A shuffled with the elements of B. ( C = { a1, b1, a2, b2, a3, b3, ...} ). If one queue has more elements than the other once all the elements from the queue with less elements have been added, all elements from the larger queue should be added.
queue difference C = A / B. C contains the elements from queue A that do not appear in queue B any number of times.
queue length (has to be called length) int = data.length(); Where data is of type queue.
Your queue class must have a correct memory management. If a queue is deleted all of its memory is to be deleted. This time we will make sure it works correctly.
The queue class must be implemented by use of inheritance from a linked list class, i.e. you will most likely end up with 3 classes. contd...
Platform:
unix environment in c++ with g++ compiler
Must be 100% finished and received by buyer on:
Mar 20, 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!
|
$20 (USD)
|
Mar 18, 2002 7:22:50 AM EDT
|
9.82
(Excellent)
|
|
|
Dear sir,
I can do this project for you in less than a day.
I have strong experince in C++.
Sincerly,
Marius. |
|
|
|
|
|