Skip to main content

CIS 163

Simple Date

Spring 2021

GitHub Classroom URL: https://classroom.github.com/a/Oy4FZRPm

YouTube video showing how to get started using Visual Studio Code

YouTube video showing how to get started using IntelliJ

Objectives:

Due Dates:

Problem Statement

You will implement and thoroughly test a class that stores and analyzes calendar dates

Workflow

  1. Create a public/private keypair and upload the public key to GitHub. This video will show you how.
  2. Follow this GitHub Classroom link and clone the resulting git repository. The key files include:
    • src/Date163.java: This is the class you will be writing. To help you get started, I've provided shells for the methods you need to write.
    • test/Date163Test.java: This will be your test class. I have provided a few sample tests to help you get started.
    • instructorTests.jar: This file is used by the auto-grader. Don't touch it.
    • lib/junit-platform-console-standalone-1.6.2.jar: This contains the JUnit library. Your IDE probably provides it; but, the autograder needs a copy in the repo.
  3. Write a thorough set of "black box" unit tests for each method in Date163. The javadoc header on each method explains what each method should do.
    • Add your tests to the appropriate section in Date163Test.java. (In other words, mix your tests in with mine. Don't just throw all yours at the bottom.)
    • Submit these tests by Tuesday, 18 May 2021, 8:00 am
    • To submit your tests, use git to commit your changes with "[Tests]" in the commit message, then push.
  4. Implement the methods in the order they appear in Date163.java. (They are listed from easiest to hardest.) Each time you complete a method, run your unit tests and watch the number of failures decrease.
  5. When your code passes all of your tests, review your tests from a "white box" perspective and add more tests if necessary.
  6. Use git to commit and push your code.
  7. After your code is committed, go the web page for your repo, click on the Actions tab, and run the tests.
    • If the automated tests all pass, congratulations! Submit your project following the instructions below.
    • If an automated test fails, then you are missing a test case in your own test suite. Add tests until one fails, fix the broken method, and submit again.

Rules:

Submitting your Project

To submit your project:

  1. Double check that your "two digit year" features have been thoroughly tested. (Remember, the auto-grader does not check these features.)
  2. Clean up your code (check for proper indention, long lines, etc.)
  3. Make sure your code meets the standards given at the end of the "Rules" section above.
  4. Fill out checklist.txt and add it to your repository.
  5. Commit/push with "[Grade me]" in the commit message.

Grading Rubric

CategoryPoints
Timeliness70
Two digit year10
Coding style20

Note: Points will be deducted for insufficient testing and/or not following a TDD workflow as discussed in class.

Timeliness is based on when your code passes the automated tests:

DayPoints
Two days early74
One day early72
On time70
Late-3 points per day

Quick Git Reference

Cloning
To clone a repo (i.e., download it to begin using it):
  1. Go to your repos main GitHub web page.
  2. Click the green button labeled "Clone or Download"
  3. Make sure the box says "Clone with SSH"
  4. Copy the URL to the clipboard. (The URL should begin with "git@github.com:")
  5. From the command line, run git clone the_url_you_copied
Committing / Pushing
To commit changes and push them to your repo:
  1. From the root of your repo, run git add ..
  2. Then run git commit -m "your_message_here". The main purpose of the message is so you can look back on the commits and know what additional work was done for each commit. I also use commit messages to know when you are ready for me to look at your work.
  3. Finally, run git push.
Pulling
If changes were made to your repository from another location, be sure to run git pull before doing additional work. There are several ways external changes can happen. For example,
  • You may be working on two different machines (e.g, a desktop and a laptop). To switch from the desktop to the laptop, you would push the changes on the desktop , then pull those changes onto the laptop.
  • I may make changes to your code, either when providing feedback, or in response to a request for help.

Updated Saturday, 15 May 2021, 7:16 PM

W3c Validation