JMU CS345 - Software Engineering
Help Policies Solutions Study-Aids Syllabus Tools
Homework: OOP Input/Output Review


1 Purpose

The primary purpose of this assignment is to help you review (and demonstrate that you have acquired) the knowledge and skills required to perform basic input/output in Java. From a language and algorithms perspective, there is nothing new in this assignment. There is also nothing new from a software engineering perspective.

2 Overview

As you know from an earlier assignment, SagaciousMedia is a (fictitious) company that develops educational hardware, software, and content for both the formal and informal education markets. SagaciousMedia's products are designed to excite and educate students, to inspire and assist teachers/instructors, and to help administrators.

v1 of their Transcriptz application got all of its input from command-line arguments. v2 must read the grade information from a file.

3 Starting Point

This assignment builds on H1. You may start with either your solution to H1 or my solution to H1. However, there is no guarantee that my code is correct; it does not contain any intentional defects, but may contain unintentional defects. You are responsible for any and all defects in your submission.

4 Documents

SagaciousMedia has created several new documents for this version.

5 Testing

Some of the tasks that you must complete involve unit testing. You must use JUnit for this purpose. Your JUnit test suite must cover all statements and all branches (as measured by EclEmma) in all of the classes/enums you submit, including the classes/enums from earlier assignments (whether you actually wrote them or I did). You should neither write tests for, nor submit, the main class. Your tests must be in a package named testing and each test class must include the word "Test" in its name.

Note that it will be difficult to test the InputUtilities class directly. Instead, you will need to test it by ensuring that the objects it constructs (i.e., the History and Cohort objects) are correct. Since each module can't be tested in isolation, this is a form of integration testing.

6 A Recommended Process

As before, the tasks that were identified by the team at SagaciousMedia are organized by story. Hence, though they are numbered so that they can be referred to in documents and conversations, the numbers should not, in any way, influence the order in which you complete them. I would suggest you sequence your activities as follows.
  1. Read and understand all of the design documents. If you have questions, ask them.
  2. Create a new project for this version and copy the classes from the previous version to do this one. (We'll talk about other ways to deal with this issue later in the semester.)
  3. Stub-out (including comments) all of the new components.
  4. Write tests for the History class.
  5. Implement the History class.
  6. Test and debug the History class.
  7. Write tests for the Cohort class.
  8. Implement the Cohort class.
  9. Test and debug the Cohort class.
  10. Create a InputUtilities class that has a stubbed-out readCohort() method.
  11. Implement the readGradeHistory() method in the InputUtilities class.
  12. Create tests for the readGradeHistory() method.
  13. Test and debug the readGradeHistory() method.
  14. Implement the readCohort() method in the InputUtilities class.
  15. Create tests for the readCohort() method.
  16. Test and debug the readCohort() method.
  17. Test and debug the complete system using the TranscriptzH4 class. When running the main class it is a good idea to include the full path and file name in the command-line/run arguments, otherwise, depending on where you put the files, you will get a FileNotFoundException. (Remember to put the whole thing in quotes if it contains spaces.)

7 Submission

You must submit (using Gradescope) a .zip file that contains:
  1. "Your" implementation of all of the interfaces/classes/enums needed to build and run the code, in the appropriate package(s) (including the JMUCourseTable class but not including the main classes).
  2. JUnit tests for all of the classes/enums you submit (in a package named testing).

There is no limit on the number of submissions and no penalty for excessive submissions.

8 Grading

Your submission will be graded by Gradescope as follows:

Note that you will not be given hints if your code does not conform to the style guide and/or does not pass your tests. You must now identify and correct these issues in your development environment.

As always, points may be deducted manually for code that is unclear, inelegant, and/or poorly documented.

9 Help with the Data Files

You should download the .zip file containing the data files into the downloads directory/folder that you created for this course. You should then unzip them in that same directory.

After you have unzipped the data files you must open a file explorer or finder, select all of the files, and drag them into Eclipse. Specifically, you must drag them into the project (not the src directory/folder or anything underneath it).

Then, in your code that needs to use these files (e.g., your tests), you should use only the file name (i.e., do not include a path). For example, you might construct a BufferedReader named in as follows:

BufferedReader in = new BufferedReader(new FileReader("bart.trn"));

It is possible to put the data files elsewhere, but then, when you submit your solution, your code will not be able to find them. In other words, for your code to work both on your computer and on the submission system, the data files must be dragged into the Eclipse project.

Copyright 2024