Dynamic Array.

computer science

Description

Dynamic Array using a linked list

Task: Create a class that implements a Dynamic Array. The class

should implement the following method/constructor

  • A constructor that allows for specifying a default size (default size may or may not be given) 
  • add Element Front: Adds an integer to the front of the array
  •  add Element Back: Adds an integer to the back of the array
  • insert Element: Adds or inserts an integer at a given location deleteElement: Deletes an integer from the element.
  • removeFront: Deletes first element in the array.
  • remove Back: Deletes last element in the array. 
  • size: Prints out the current size of the array
  • Print: Prints out the elements in an array

Once your class is created, create another class that instantiates your dynamic Array and exercise your methods.

 Your class should provide an input loops that waits for user input

  • (command) and then performs the operation, make sure the commands are case insensitive User commands:
  • Create AddFront <num>
  • AddBack <num>
  • Insert <location>, <num>
  • Del <num>
  •  delFront
  • delBack
  • Size
  • Print
  • Exit
  •  Make sure you use proper coding standards (comments, memory leak free, error checking, graceful termination, etc.)


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.