Sie sind auf Seite 1von 2

Project 6

Software Implementation
Using Test Driven Development
Mission:
You were hired to implement usingJava a Train system simulation, designed by a
developer who suddenly left the team. You are provided with the design specification
document (Project6-Train-SDS.doc) and unit test suite (tests.zip). You are to assume that
design description is correct for what each class and method is supposed to do and so are
the JUnit tests and your Java code is supposed to match them.
Objectives:
You must implement the system using the given design and make sure that all the unit
tests pass against your code. Your program must implement the complete design to
include all the classes, methods, constructors, constants, and attributes, and the input and
output specification exactly. You cannot redesign or change the system.
Steps:
Create a new project in Eclipse and import the unit tests (tests.zip) and data files into
your projects src. Add JUnit library to your Eclipse project
Note that you will have syntax errors in the tests until you create all the classes
The unit test suite is divided into the basic and advanced tests for each Java class.
You should first implement (for each class) the attributes, constants, and empty
methods (method signatures) to pass the basic tests.
Then you should start implementing each method running the appropriate tests
against it.
To run an individual test, highlight the test method name, right click on it, select Run
As and select JUnit Test
Trains simulate method has been implemented for you. Copy and paste the code in
simulate.txt to your Train class.
Run the code and unit tests against them until all defects are fixed
For default file tests under TestSimulatorAdvanced you will need to run them
individually with and without that file being on your system (C:/train/customerdata.txt). Check comments for tests which tests require the file and which not
Once all the unit tests are working, create a sample input file and run the program
with it. Capture the screenshot of the output
Warning: If you use Scanner for reading console and/or file, do not close it because
when you try to use again it will not work.
Resources:
Proj6-MSIT660-GradingCriteria.doc lists the grading criteria
You can use any code examples under My Course Content->Code Examples
Deliverables:

Your program files - all .java files (one java file per class)
Sample data file data.txt
Output screenshot paste into Word doc your-name-Output.docx

Das könnte Ihnen auch gefallen