Part A: Multi-threading; Inheritance and Interface Polymorphism

Provide two implementations of Multi-threadng, (One uses inheritance and the other uses interface) for the following tasks: (Use Synchronized blocks to prevent mutual exclusion violation)

i) Concurrently find and calculate the highest number in an integer array called myNumbers.

ii) Update the value to a variable called highestNumber.

Part B: Stacks and Queues, Linked-List versus Growable Arrays

interface Queue {
void Enqueue(int n);
int Dequeue();
int length();
}

interface Stack {
void Push(int n);
int Pop();
int length();
}

Given the following interfaces for Stacks and Queues, implement each interface in two ways: using a Linked-List and a Stack. (That means, a total of FOUR implementations is needed. E.g., Queue using Linked-List & Queue using Growable Array. Provide a short paragraph of your observation once you have completed all the implementation. Use the folllowing names MyStack1, MyStack2, MyQueue1, MyQueue2 in your code.

part C: Generics

Briefly describe which part of code change is needed so that your implementations in Part B can accommodate and type of objects. Meaning: It can store type of objects. Provide at least two lines of code that shows how the container gets instantiated and how an object can be stored inside your container.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.