Question
This project will give you some practice implementing an ADT from an interface. 1. Download the files CM307List.java.txt, P02Driver.java.txt and P02Output.txt from the Project Files
This project will give you some practice implementing an ADT from an interface.\ 1. Download the files "CM307List.java.txt", "P02Driver.java.txt" and "P02Output.txt" from the\ Project Files folder on the class website on D2L. Remove the .txt extension from the Java files.\ 2. Write the ADT "CM307ArrayList.java" that implements the CM307List interface. You can use the\ code in Unit 4, but you'll learn more if you write it yourself only using the unit when you are stuck.\ 3. Your initial array should have 5 elements. It should double in size when it runs out of room (make a\ "reallocate" method similar to the unit).\ 4. Follow the interface specifications carefully, especially regarding what is allowed and what should\ be done if the index is out of range. You need to provide all methods of the interface.\ 5. Provide a toString() method so it is easy to print the contents of the list. It should print the list\ similar to the way it is done in the P02Output.txt file.\ 6. Provide an iterator for your class.\ 7. Ignore the errors about unchecked/unsafe operations. You will see these whenever you make an\ array of a generic type. This is the right way to do this and Java shouldn't give errors.\ 8. Compile and run the P02Driver and compare your output to mine. Some of the lines in my output\ have been redacted. Your output will differ from mine for those lines
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started