编程辅导 C C++ Java Python MIPS Processing 网络家教 在线辅导

编程家教 远程写代码 Debug 讲解答疑 课后答疑 不是中介,本人直接答疑

微信: ittutor QQ: 14061936 Email: ittutor@qq.com

导航

 Duration Formatting

The primary goal of this assignment is to get more practice with Java, while working in the context of a simple object-oriented design. A secondary goal is to think carefully about tests and test coverage.

2 Description

This assignment is an extension of the code written in Lecture 4. Your task is to implement and test a method String format(String template) for formatting durations as strings.

This ZIP archive contains the files you need to start. Compared to the version in the lecture notes, I’ve made two changes:

  • In interface Duration (source), I added the signature of the format method, along with a JavaDoc comment detailing its specification. (The signature is currently commented out so that the code in the archive compiles as-is. You will need to uncomment it.)

  • In the class AbstractDurationTest (source), I added (and commented out) two test methods for format, called testFormatExample1 and testFormatExample2. These serve as examples, but you will need to add several more.

To complete this assignment, you must:

  1. Uncomment the format method signature in the interface.
  2. Implement the method in the appropriate place(s).
  3. Uncomment the example tests.
  4. Add additional tests as needed to exercise every non-trivially distinct possibility.
  5. Make sure your code compiles and all tests pass.

3 List of Deliverables

  • any files you modified to complete the task

4 Grading Standards

For this assignment, you will be graded on

  • whether your code implements the specification (functional correctness),
  • the comprehensiveness of your test coverage, and
  • how well you follow the style guide.

5 Submission

Please submit your homework to the CS 3500 submission server. Then be sure to complete your self evaluation by 11:59 PM on Thursday, Sept. 25.

相关推荐