Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ code #include #include #include using namespace std; void reverse(char* front, char* rear); // Precondition: The front and rear are pointing to the front //

C++ code  #include  #include  #include  using namespace std; void reverse(char* front, char* rear); // Precondition: The front and rear are pointing to the front // and rear of a C-string, respectively // Postcondition: The C-string is reversed string* addEntry(string* dynamiccArray, int& size, string newEntry); // Precondition: dynamicArray point to a array of strings with give size, // newEntry is a string // Postcondition: A new dynamic array is created, which is one larger than // dynamicArray All elements from dynamicArray are copied to // new array, the new entry is added to new array, the size // is increased, the dynamicArray is deleted, new dynamic // array is returned. string* deleteEntry(string* dynamicArray, int& size, string entryToDelete); // Precondition: dynamicArray point to a array of strings with give size, // newEntry is a string // Postcondition: The function should search dynamicArray for entryToDelete. // If not found, the request should be ignored and the // unmodified dynamicArray returned. If found, create a new // dynamic array one element smaller than dynamicArray. Copy // all element except entryToDelete into the new array, delete // dynamicArray, decrement size, and return the new dynamic // array void print(const string* dynamicArray, int size); // Precondition: dynamicArray point to a array of strings with give size, // Postcondition: The elements in dynamic array will be print out. One // element per line forllowed by its index int main() { // write code to test reverse function. // make sure that you test it on at least two strings // one string has even length, another string has odd length // write code to test add entry and delete entry function // you may watch video notes to get idea for this part return 0; } void reverse(char* front, char* rear) { // you implement this. Please read Programming Project 4 on page 535 } string* addEntry(string* dynamicArray, int& size, string newEntry) { // you implement this. Please read Programming Project 6 on page 536 // you may watch video notes to get the idea } string* deleteEntry(string* dynamicArray, int& size, string entryToDelete) { // you implement this. Please read Programming Project 6 on page 536 // you may watch video notes to get the idea } void print(const string* dynamicArray, int size) { // you implement this. // you may watch video notes to get the idea } 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

Students also viewed these Databases questions

Question

What are Electrophoresis?

Answered: 1 week ago