Please read the following requirements carefully and then implement your own customized Array class:

provide the following features:

Don't use plagiarized sources. Get Your Custom Essay on
Java
Get an essay WRITTEN FOR YOU, Plagiarism free, and by an EXPERT! Just from $10/Page
Order Essay

Two constructors. One takes the input of the initialized capacity (int) and create the underlying array with that capacity; the other takes no input and creates an array that can hold a single element by default (that is, init capacity == 1);

Getters and setters and basic methods we discussed during the class including: getCapacity(), getSize(), set(int index), get(int index), isEmpty();

CRUD operations we discussed during the class including: add(int index), addLast(), addFirst(), remove(int index), removeLast(), removeFirst(), removeElement(int target), removeAll(int target);

Supports generic types;

Mutable, that is when add element exceeding its capacity, it can resize to accommodate the change.

Implement a (private or public) swap(int a, int b) method that swaps the two elements in the index a and b if a and b are both admissible; also a public reverse() method that reverses the order of stored elements in-place (means, no additional spaces are allocated).

A public void sort() method sorts the stored elements in ascending order inO(nlog(n)) time.

[hint]: Quicksort or Merge sort

Phyllis Njino

Recent Posts

Patterns of Knowing | Nursing Theory

Nursing Theory  Read Ch. 7  (Hood) Click the following link to view the Clayton State University…

2 weeks ago

communication MA | Solution Aider

part one For this assignment you are to to watch: Shattered Glass Write a two…

4 years ago

Standard Project – WebServers | Solution Aider

Standard Project - WebServers. Instruction attached. Need all requirements, you do not have to make…

4 years ago

Discussion post 2 | Solution Aider

Read classmates post and respond with 100 words:The International Categorization of Diseases, Tenth Revision, Clinical…

4 years ago

case sttudy | Solution Aider

Most Americans have at least 1 issue that is most important to them. Economic issues…

4 years ago

Methodologies Report | Solution Aider

For this assignment, you are the court intake processor at a federal court where you…

4 years ago