Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Testing CSE360 Assignment 1 Due Feb 10 No late assignments or incorrect (non-java) files will be accepted. 1. Generate the initial set of junit test
Testing CSE360 Assignment 1 Due Feb 10 No late assignments or incorrect (non-java) files will be accepted. 1. Generate the initial set of junit test cases. All should have the initial result of "fail. This will create the file "SimpleListTest.java". There is an example of creating junit tests in the PowerPoint slides with this assignment. This process may vary with your version of Java. This assignment is designed to give you practice with Javadoc, creating unit tests and using Junit. 2. Feel free to work with your teaching assistant to help with this process. Be sure to follow all style and documentation requirements for THIS class. See the style and documentation requirements posted on Canvas. 3. In addition, there are a lot of tutorials online to help you. Here are a couple of sources I found https://www.vogella.com/tutorials/JUnit/article.html https://www.youtube.com/watch?v=bdc5WbKKOK4 You are to name your package assign1 and your file SimpleList.java. Simple List Class 4. Complete the code for your test cases. Create new methods as needed for different tests. Your tests should not have any if statements, loops or output. Use the asserts to check the results. Test your code and then test it again. SimpleList - - list- int[] count: int Submitting Make sure that all the code meets all coding and documentation standards. The junit test cases should include basic documentation while the SimpleList.java file should contain external documentation using Javadoc style. + SimpleListo + add (int): void + remove (int): void + count O: int + toString 0: String + search 0:int Using the link on Canvas, submit your SimpleList.java file and your SimpleListTest.java file for grading. These will be downloaded, compiled and graded as well as checked for plagiarism and similarity to other students' work. Notice - there is no main, no input and no output for this assignment. Grading Creation of junit tests - only if the code compiles Coding style and documentation - only if code compiles Results from tests - only if code compiles Method Descriptions 25% 20% 55% Note: Your test file must be submitted but your code will be tested using other tests. SimpleList - Create an array to hold 10 integers and set count to 0. add (int): void - Add the parameter to the list at the beginning (index=0). Move all the other integers in the list over so there is room. If the list was full, then the last element falls off the list. Increment the count as needed. remove (int): void - If the parameter is in the list, then remove it. The other values in the list may need to be moved down. Adjust the count as needed. count : int - Return the number of elements stored in the list. toString 0: String - Return the list as a String. The elements must be separated by a space. This means there is not space after the last integer. search (int): int - Return the location of the parameter in the list. If the parameter is not in the list, then return -1
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