Implement array-based list for integers; following methods should be implemented. Dynamic array would be preferred.
void insertAtPosition(int x,int pos); //insert value x at given position
void insertAtEnd(int x); //insert value at the end of the array
void insertAtFront(int x); //insert value at the first position of the array
void removeFromFront(); //remove element from first position and move all element up //to fill the gap
void removeFromEnd(); //remove element from the end of the array
void removeFromPosition(int pos); //remove element from the position given by user. After the //operation there should be no gap in the elements of array
int find(int x) const; //return the index
int findPosition(int pos) const; //find at given position and return the value
bool IsEmpty() const; //return true if list is empty
bool isFull() const; //return true if list is full
void print() const; //print the whole list
Note: Implement the main() to show that all above given methods are working properly
1
Expert's answer
2013-03-27T09:55:04-0400
Unfortunately, your question requires a lot of work and cannot be done for free. Submit it with all requirements as an assignment to our control panel and we'll assist you.
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment