CSC115 Assignment 2 non-static methods

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (4 votes)

Objectives
• Experience working with Objects and Arrays in Java
• Experience writing both static and non-static methods
• Further experience with code testing and debugging
Objectives
This assignment requires you to implement and test non-static methods in the Date class for Part 1, and
then implement and test static methods in the A2Exercises class for Part 2.
Although there is a tester provided for this assignment, it does not include a comprehensive set of sets for
each method. You should add your own tests for any test cases not considered.
Note: The automated grading of your assignment will include some different and additional tests to those
found in the A2Tester.java file.
Quick Start
1. Download all of the .java files found in the Resources > Assignments > a2 folder.
2. Compile and run A2Tester.java
3. Open the A2Tester.java file. Read through the tests for testDateConstructor to see what the
expected behaviour is for the second Date constructor. Implement the second Date constructor,
save, and then recompile and run A2Tester.java. If any tests fail, fix the errors until all of the tests
pass for that method. Add any tests that you feel are necessary.
4. After finishing your implementation of the second Date constructor, uncomment the second test
method in A2Tester.java (testEquals). Follow the same process that you did in step 3. until you are
certain the equals method has been implemented correctly in the Date class.
5. Continuing moving down one test method at a time until all of the required methods have been
implemented. Remember to write additional tests until you are sure that your implementation will
work correctly under all different possible input scenarios.
CRITICAL: Any compile or runtime errors will result in a zero grade (as if the tester crashes it will not
be able to award you any points for any previous tests that may have passed). Make sure to compile and
run your program before submitting it!
Submission and Grading
Submit Date.java and A2Exercises.java with your name and student ID at the top of each file using ConneX.
If you chose not to complete some of the methods required, you must provide a stub for the incomplete
method(s) in order for our tester to compile (there are stubs for each method right now, which is why it
will compile without issue). If you submit files that do not compile with our tester, you will receive a zero
grade for the assignment. It is your responsibility to ensure you follow the specification and submit the
correct files. Additionally, your code must not be written to specifically pass the test cases in the tester,
instead, it must work on all valid inputs. We may change the input values when we run the tests and we
will inspect your code for hard-coded solutions.
Be sure you submit your assignment, not just save a draft. ALL late and incorrect submissions will be
given a ZERO grade. A reminder that it is OK to talk about your assignment with your classmates, but not to
share code electronically or visually (on a display screen or paper). We will be using plagiarism detection
software.