. Start Eclipse and create a new Java project Lab13. 2. Download lab13.zip and extract it on your computer. 3. Import the two java files into your project Lab13 using right click src in Lab13 -> Import -> General -> File System -> next -> Browse (the CSC 1106 THE ART OF PROGRAMMING LAB 13 1directory you save IntegerList.java and IntegerListTest.java) -> open -> check IntegerList.java and IntegerListTest.java from right window -> Finish. 4. In the IntegerListTest, create a new list, print and check if it returns the correct list; 5. Add a method void replaceFirst(int oldVal, int newVal) to the IntegerList class that replaces the first occurrence of oldVal in the list with newVal. If oldVal does not appear in the list, it should do nothing (but it’s not an error). If oldVal appears more than once, only the first occurrence should be replaced; (Note: you already have a method to find oldVal in the list, so use it!) 6. Add an option to the menu in IntegerListTest to test the above new method.
These are the directions my professor gave me.
I would really appreciate any help you could give me with this practice lab, I have been stuck on it for a while...
1. Start Eclipse and create a new Java project Lab13.
2. Download lab13.zip and extract it on your computer.
3. Import the two java files into your project Lab13 using right click src in Lab13
-> Import -> General -> File System -> next -> Browse (the
CSC 1106 THE ART OF
-> open -> check IntegerList.java and IntegerListTest.java
from right window -> Finish.
4. In the IntegerListTest, create a new list, print and check if it returns the correct list;
5. Add a method void replaceFirst(int oldVal, int newVal) to the
IntegerList class that replaces the first occurrence of oldVal in the list with newVal.
If oldVal does not appear in the list, it should do nothing (but it’s not an error). If oldVal
appears more than once, only the first occurrence should be replaced; (Note: you already
have a method to find oldVal in the list, so use it!)
6. Add an option to the menu in IntegerListTest to test the above new method.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps