Please i need any friend to help me for this homework, and if possible send to answer directly to mine address a.nego51@yahoo.fr
A、Basic Practices (BOTH ARE obligatory)
1、(20 percent)
By analyzing the map shown under the rules of procedures for the preparation of the output of the map. Please Program to implement it.
2、(20 percent)
There are two given arrays of A, B. Both are unordered. Programming to combine A, B array to form a new array C, and make the elements of array C to be in an orderly manner (smallest in descending order).
int A[10]={ 88,89, 123,186,33,15,57,0,-10,-3};
int B[10]={826,69,51,150,27,19,105,12,75,2};
B、Advanced Practices (SELECT 1 FROM 3)
1、(60 percent)Designing a set class.
Requirements:
The element data type: double;
The set can have 0 or SOME elements WITHOUT repetition.
You need implement the following interfaces:
1) Create a Set object;
2) Add an element into Set;
3) Delete an appointed element from Set: can use index or value;
4) Delete all elements of the Set;
5) To String: Convert the Set into string like “{1.9, 2.9, 3.5}”;
6) Display all elements of the Set on screen;
7) Get the intersection of two Set objects;
8) Get the union of two Set objects;
9) Get the minus of two Set objects;
10) Override the operators: << , >>.
2、(60 percent)
Designing a singly linked list class.
You need to implement :
1) the constructor for create a list;
2) insert a node into list by given index;
3) delete a node of list by given index;
4) modify the given index node of list;
5) find the node by index or by the information of node;
6) count the nodes of list;
7) output all nodes information to the screen.
3、(60 percent)Complete the class under the following.
class String
{
public:
String(const char *str = NULL);
String(const String &other);
~ String(void);
String & operator =(const String &other);
String operator + (const String& other) const;
bool operator > (const String& other) const;
bool operator < (const String& other) const;
bool operator ==(const String& other) const;
void Append(const char *str = NULL);
void Insert(int nIndex, const char* str);
int FindFirstof(char F) const;
int FindFirstof(const char* str) const;
void Erase(int nIndex, int nCount);
char GetAt(int nIndex) const;
int GetLength() const;