, , , , , , ,

[SOLVED] Cs6300 assignment 3: basic java coding and junit 2025

$25

File Name: Cs6300_assignment_3__basic_java_coding_and_junit_2025.zip
File Size: 499.26 KB

5/5 - (1 vote)

To complete the assignment, you must complete the following tasks:

https://github.gatech.edu/gt-omscs-se-2025summer/6300Summer25<GT username>.git

(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>/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

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():

 

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>

}

To submit your solution, you should:

gpburdell1

81b2f59

 

As soon as you submit, your assignment will be graded by compiling your code and running it against both your test cases and a set of test cases, written by the instructors. All tests must pass.[1] After that, which should take a few minutes at most, you will see a report with your grade and some corresponding feedback. The feedback should be self-explanatory (e.g., “ERROR: You have 17 tests instead of 16.”), but please let us know otherwise.

The grade you will see on Gradescope is your actual grade for the assignment, unless we find some issues with your submission (e.g., hardcoding of the results, identical tests, or similar).

You can resubmit as many times as you want before the deadline, so you have a chance to address issues with your assignments if Gradescope finds an issue with your submission.

○ Assignment3/test/edu/gatech/seclass/MyStringTest.java

○ Assignment3/lib/junit-platform-console-standalone-1.9.1.jar

Feel free to commit extra files (e.g., IDEA’s project-related files), as this does not make a difference for your grade.

○ The already provided test cases except for those that you are supposed to implement, obviously, whose body is simply “fail(“Not yet implemented”)”.

○ The test class name, the names of the test cases, and the test comments, except for replacing “<Add test description here>” with a concise description of the purpose of the test. We understand that it may be advisable to use more meaningful names for the tests, but having numbered tests helps the grading. ○ The declaration of mystring in the test class.

○ Go to directory Assignment3 in this fresh clone

○ Compile your code. One way to do is to run, from a Unix-like shell:

javac -cp lib/* -d classes src/edu/gatech/seclass/* test/edu/gatech/seclass/MyStringTest.java

(on some platforms, you may need to first create directory “classes”)

○ Run your tests. Again, from a Unix-like shell, you can run:

java -cp classes:lib/* org.junit.platform.console.ConsoleLauncher

–select-class edu.gatech.seclass.MyStringTest[3]

 

Gradescope Feedback: The test case results that you see in Gradescope tell you whether a given test passed or not. If the test didn’t pass, Gradescope should show the difference between the expected and actual output. For ease of consumption, that difference may contain ellipses (“…”) to make the feedback more compact by omitting common parts of expected and actual output, and use square brackets to map corresponding parts of the output that differ in the expected and actual output.

Requests for clarifications: If you need clarifications on a specific test or Gradescope output, please post privately on Ed Discussion (we will make it public if appropriate) and make sure to add, when it applies:

The bottom line is that, to make the interaction efficient, you should make your posts as self-contained and easy-to-check as possible. The faster we can respond to the posts, the more students we can help.

Although it is not mandatory, we recommend that you use IntelliJ IDEA to complete the assignment, so that you can also get familiar with this IDE (if you aren’t already). To do so, you should open IDEA and do the following (notice the initial, alternative steps):

 

○ Select <dir> as the directory to import

 

 

○ Select <dir> as the project directory

 

○ Select “Create project from existing sources”

 

 

○ Click “Next” accepting the default choices (make sure to include the provided libraries and to select Java SDK 17) and then “Finish”:

○ If SDK is not installed, choose to download:

 

 

 

[1] Our test cases make sure that you implemented the functionality of the required methods correctly. They are fairly simple and are not trying to exercise arcane corner cases.

[2] Internal Java libraries are those documented in the Java Platform Standard Edition API Specification.

[3] If using a Windows-based system, you may need to instead run: java -cp “classes;lib/*”

org.junit.platform.console.ConsoleLauncher –select-class edu.gatech.seclass.MyStringTest

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] Cs6300 assignment 3: basic java coding and junit 2025[SOLVED] Cs6300 assignment 3: basic java coding and junit 2025
$25