You should answer the question two times such that you would expect:
1. a first solution to receive a B grade or as high as you can, 2. a second solution receive a D grade.
1. All parts of both solutions should:
• compile, and
• be complete, i.e. an answer must be provided to parts that expect a coded solution (however, it can be incorrect as long as it compiles). You cannot differentiate the quality of the solution based on the last part of each question, as this is reserved for me to assess the quality of your code in a real assessment scenario.
To substantiate your claim on the quality of the solutions, prepare and execute ONE set of JUnit tests that evidences the rank order of your solutions. Both solutions should be tested with the same set of unit tests.
You can have two JUnit test .java files, if needed (these can be hard-coded to call the various solutions). You can also give each of your solutions unique names for this assignment (i.e. you are not obliged to following the naming instructions in the exam), just make sure this is made clear in your video to avoid any confusion during the grading process. However, all methods with a @Test annotation must be the same if multiple instances of the JUnit tests are present.
If you are unsure how to start, recreate the examples as unit tests. Other things you could consider: look at any requirement in the question text, and try to derive a test for that. Explore the possibility of incorrect input and whether the solution can handle that.
1. Provide a .java file of your JUnit tests. Each test should be appropriately commented to note:
1. which question part they are evaluating, and
2. what they are seeking to test (this can be a repeated version of detail in the video)
Provide a .java file for each of your solutions. Each solution should be commented to identify which part(s) of the code correspond to the part(s) of question. You should also include a comment at the start of the .java file to note whether the solution is to be considered the B (or better), or D grade solution
I have done the good code version but I need to do the bad version and make sure it still compiles