TO GET THIS SOLUTION VISIT:
https://www.ankitcodinghub.com/produc...
---
Email: ankitcoding@gmail.com
WhatsApp: +1 419 877 7882
Get a quote: https://www.ankitcodinghub.com/servic...
We deliver fast, professional, and affordable academic help.
---
Description
Description
5/5 - (3 votes)
Instructions
To complete the assignment, you must complete the following tasks:
Clone your individual GitHub repository in your local workspace. This is the same repository that you used for the previous assignment and will use for all future individual assignments:
https://github.gatech.edu/gt-omscs-se... username›.git
Download the archive assignment tar.gz
Extract the archive in the root directory of the repository, which will create a directory called Assignment3 and several subdirectories. Hereafter, we will refer to the directory Assignment3 in your local repo as ‹dir›.
(If you do not know how to extract a “tar.gz” archive, you should be able to find plenty of resources on how to do that online–ask on Ed Discussion otherwise.)
Directory ‹dir›/src contains, in a suitable directory, the Java interface gatech.seclass.MyStringInterface. It also contains an exception class edu.gatech.seclass.MyIndexOutOfBoundsException, which is used by the interface.
○ Directory ‹dir›/test contains, in a suitable directory, a template JUnit test class edu.gatech.seclass.MyStringTest.
○ File ‹dir›/lib/junit-platform-console-standalone-1.9.1.jar, a JUnit library to be used for the assignment
Your first task is to develop a Java class called MyString that suitably implements the MyStringInterface interface that we provided. The semantics of the methods in the interface should be obvious from their name, the JavaDoc comments in the code, and the test examples in class MyStringTest–ask on Ed Discussion otherwise. Class MyString should be in the same package as the interface and should also be saved under ‹dir›/src/edu/gatech/seclass.
Your second task is to develop a set of JUnit5 test cases for class MyString by completing the provided template test class MyStringTest, which contains 3 complete test cases and 13 to-be-completed test cases. For each test case in class MyStringTest whose body simply consists of the placeholder instruction “fail(“Not yet implemented”);”, you must do the following:
Provided for you:
■ Placeholder instruction ○ Required from you:
■ Write a meaningful test case for the method, as identified by the placeholder instruction.
■ Replace the text “‹Add test description here›” in the test comment with a concise description of the purpose of the test (e.g., “Count words in an empty string”) without modifying anything else in the comment and making sure that your comment consists of a single line (i.e., does not contain newlines) and does not contain quotes or other special characters.
■ Make sure that every test method has a suitable oracle (i.e., either an assertion or an expected exception) and that the tests are not trivial (i.e., are not a copy of the provided one and have a specific purpose). In other words, each test should (1) test a specific piece of the functionality, and
(2) check that such a piece of functionality behaves as expected.
■ It should be obvious, but please also make sure that all the test cases you created pass when run against your code.
■ In addition, at least two of the tests that you develop must result in an expected exception (e.g., NullPointerException). When testing for an expected exception, make sure to assert as follows:
assertThrows(‹exception_class_name›.class, () -› mystring.‹method_name›(..args))
○ Consider, for example, test case testCountWordsS2():
@Test
@Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
// Description: ‹Add test description here› public void testCountWordsS2() { fail(“Not yet implemented”);
}
In your submission, you should have a corresponding, complete test for method countWords in class MyString, together with a concise description of the purpose of the method, such as:
@Test
@Timeout(value = 5000, unit = TimeUnit.MILLISECONDS) // Description: Count words in an empty string public void testCountWordsS2() {
‹actual test, including the oracle›
}
Submission
To submit your solution, you should:
Commit dir ‹dir› and push it to the individual remote GitHub repository we assigned to you. Make sure not to push your work to any other repo, especially public ones. In the best case, you may end up submitting a commit ID we cannot find. In the worst case, you may be violating the honor code.
Make sure to commit and push the provided libraries (lib directory). To do so, you may need to force add the jar files (i.e., “git add -f l
Nesta página do site você pode assistir ao vídeo on-line CS6300 Assignment 3-Basic Java coding and JUnit 2025 Solved duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Ankit Coding 06 Setembro 2025, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 5 vezes e gostou 0 espectadores. Boa visualização!