|
| 1 | +<!-- |
| 2 | +Create pdf with |
| 3 | +pandoc project-spec-2025.md -s -o project-spec-2025.pdf |
| 4 | +See installation notes here |
| 5 | +https://gist.github.com/ilessing/7ff705de0f594510e463146762cef779 |
| 6 | +--> |
| 7 | + |
| 8 | +--- |
| 9 | +title: | |
| 10 | + ```{=latex} |
| 11 | + \vspace{-2em}CITS5501/CITS3501 Project 2025 phase 2 |
| 12 | + ``` |
| 13 | +classoption: oneside |
| 14 | +papersize: a4 |
| 15 | +fontsize: 12pt |
| 16 | +geometry: |
| 17 | +- top=0.9in |
| 18 | +- bottom=0.8in |
| 19 | +- left=0.7in |
| 20 | +- right=0.7in |
| 21 | +colorlinks: true |
| 22 | +linkcolor: blue |
| 23 | +urlcolor: blue |
| 24 | +--- |
| 25 | + |
| 26 | +\vspace{-3em} |
| 27 | + |
| 28 | +| **Version:** | 0.1 | |
| 29 | +|--------------|------------------------| |
| 30 | +| **Date:** | 12 September 2025 | |
| 31 | + |
| 32 | +<!-- |
| 33 | +**Changes in version 0.2** |
| 34 | +
|
| 35 | +- Changes here |
| 36 | +- Changes here |
| 37 | +--> |
| 38 | + |
| 39 | + |
| 40 | +<!-- these abbreviations only work in pdf not in html --> |
| 41 | +\def\travelsystem{\textsc{Tachi}} <!-- (https://en.wikipedia.org/wiki/Tachi) --> |
| 42 | +\def\travelco{\textsc{Koto}} <!-- Tachi were the mainstream Japanese swords of the Kotō period between 900 and 1596 --> |
| 43 | +\def\iata{\textsc{iata}} |
| 44 | +\def\iso{\textsc{iso}~} |
| 45 | + |
| 46 | +\def\iata{\textsc{iata}} |
| 47 | +\def\iso{\textsc{iso}~} |
| 48 | + |
| 49 | + |
| 50 | +\def\totalmarks{35} |
| 51 | +\def\partonemarks{15} |
| 52 | +\def\parttwomarks{20} |
| 53 | + |
| 54 | + |
| 55 | +# Project Admin |
| 56 | + |
| 57 | +For project administrative matters and rules, refer to the phase 1 project specification. |
| 58 | + |
| 59 | +# Deliverables (\parttwomarks{} marks total) |
| 60 | + |
| 61 | +There are three deliverables for phase 2 of the CITS5501 project: |
| 62 | + |
| 63 | +- A text file containing an EBNF grammar. The grammar must compile using the [BNF |
| 64 | + Playground][bnf-playground] website. |
| 65 | +- A report (submitted as PDF), created from a Markdown file. |
| 66 | +- Your Java source code with Javadoc for a JUnit test class, `SegmentSubcommandTest.java` |
| 67 | + |
| 68 | +The source for all three deliverables should be checked into version control in your GitHub |
| 69 | +repository. We will use the submitted version for marking, but your facilitator may inspect |
| 70 | +the GitHub repository for additional information on your group's collaboration and quality |
| 71 | +assurance processes. |
| 72 | + |
| 73 | + |
| 74 | +[bnf-playground]: https://bnfplayground.pauliankline.com |
| 75 | + |
| 76 | +# Task 4 -- Tachi commands |
| 77 | + |
| 78 | +## Task 4.1 -- Command grammar (3 marks) |
| 79 | + |
| 80 | +Create a BNF or EBNF grammar that will parse (or generate) valid \travelsystem{} |
| 81 | +commands. Your grammar should be a plain text file (not MS Word, Markdown, |
| 82 | +or any other format). |
| 83 | + |
| 84 | +Requirements for the grammar are as follows: |
| 85 | + |
| 86 | +1. The syntax for \travelsystem{} commands is |
| 87 | + described in the Phase 1 specification, under "\travelsystem{} command description". |
| 88 | +2. Your grammar should use the notation accepted by the [BNF Playground][bnf-playground] website. |
| 89 | +3. You should not attempt to validate semantic properties of commands. |
| 90 | +4. The grammar should include a non-terminal, |
| 91 | + `<tachi_command>`, to be used as the start symbol for the grammar. |
| 92 | +5. The grammar SHOULD specify any whitespace that needs to appear |
| 93 | + between other symbols in the command. But as a simplifying assumption: |
| 94 | + if symbols need to be separated by horizontal whitespace (tabs and spaces), |
| 95 | + you can and should assume that a single space character is sufficient. |
| 96 | +6. Your grammar is a code artifact, and should be clear and well-presented, like any code. |
| 97 | + |
| 98 | +\newpage |
| 99 | + |
| 100 | +**Tips:** |
| 101 | + |
| 102 | +1. Make sure you read the [BNF playground][bnf-playground] website thoroughly -- it includes a |
| 103 | + description of the dialect of EBNF it uses, under "Grammar Help". |
| 104 | +2. Read through the CITS5501 [rubric guide][rubric] on "Long answer" questions requiring code. |
| 105 | + Make sure you understand how those guidelines apply to EBNF grammars. (Your facilitator |
| 106 | + may be able to provide some assistance.) Ensure you know how to comment your grammar, |
| 107 | + structure it so it is clear to a reader, and make use of appropriate use of EBNF features |
| 108 | + which would make your grammar clearer or more concise. |
| 109 | + |
| 110 | +[rubric]: https://cits5501.arranstewart.io/faq/#marking-rubric |
| 111 | + |
| 112 | +**Submission**: You will submit your grammar as a text file in Moodle. You should also |
| 113 | +maintain it as a file within your project repository, so markers can see how it has been |
| 114 | +revised and reviewed. |
| 115 | + |
| 116 | +## Task 4.2 -- Command grammar quality (3 marks) |
| 117 | + |
| 118 | +Briefly explain (word limit: 1000 words) how you ensured your grammar from Task 4.1 is: |
| 119 | + |
| 120 | +- correct; |
| 121 | +- clear; and |
| 122 | +- succinct. |
| 123 | + |
| 124 | +What high-level strategies/approaches did you use? What concrete techniques did you apply? |
| 125 | +Did you adopt any coverage criteria, and if so, which ones and why? |
| 126 | +You should link to at least one point in your project repository where the grammar has been |
| 127 | +reviewed for quality. |
| 128 | + |
| 129 | +You should discuss the degree to which your quality assurance techniques can be _automated_ -- |
| 130 | +could they be run automatically when changes are made to the code, or do they require manual |
| 131 | +steps? If the latter, discuss whether this would be appropriate for a real-world project, |
| 132 | +and what improvements could be made to them. |
| 133 | + |
| 134 | +**Submission**: This should be a section in your report, and be given the heading "Task 4.2". |
| 135 | + |
| 136 | +# Task 5 -- Java testing |
| 137 | + |
| 138 | +For Task 5, you are provided with a Java library (in the form of several JAR files) |
| 139 | +containing compiled code and documentation for classes that |
| 140 | +process \travelsystem{} commands. The JAR files can be downloaded |
| 141 | +[here](https://cits5501.arranstewart.io/project/tachi-jar-files.zip). |
| 142 | +You are required to discuss approaches to testing the library and to implement several tests. |
| 143 | + |
| 144 | +The JAR files are intended to be used by adding them to a Java project. (How this is done |
| 145 | +depends on your exact project setup and/or IDE, but if using VS Code, it should be sufficient |
| 146 | +to add them to a `lib` directory that is a sibling of any `test` directory you create to |
| 147 | +contain your JUnit test class.) |
| 148 | + |
| 149 | +## Task 5.1 -- `ShopFlightFareCommand` class analysis (3 marks) |
| 150 | + |
| 151 | +Describe in detail the preconditions and postconditions of the |
| 152 | +constructor for the `ShopFlightFareCommand` class, justifying your |
| 153 | +answer (word limit: 500 words). |
| 154 | + |
| 155 | +**Submission**: This should be a section in your report, and be given the heading "Task 5.1". |
| 156 | + |
| 157 | +## Task 5.2 -- Input Space Partitioning (4 marks) |
| 158 | + |
| 159 | +Apply Input Space Partitioning (ISP) to two methods or constructors |
| 160 | +in the Java library. One of these should be |
| 161 | +the `SegmentSubcommand` constructor; the other can be a method or constructor |
| 162 | +of your choice. |
| 163 | + |
| 164 | +Explain the steps you took in applying ISP (word limit: 1000 words). Your explanation should |
| 165 | +include: |
| 166 | + |
| 167 | +- a level of coverage you think your test cases should achieve, and why you chose that level; |
| 168 | + and |
| 169 | +- the characteristics and partitions you derived. |
| 170 | + |
| 171 | +Your descriptions of characteristics and partitions can be fairly brief (bullet points, |
| 172 | +tables, etc. are sufficient), but you should pick three characteristics to discuss in more detail. Explain |
| 173 | +how you arrived at those characteristics and partitions, and what the rationale for them is. |
| 174 | + |
| 175 | +You need only refine your characteristics and partitions into *four* test cases. At least |
| 176 | +three test cases should be for the `SegmentSubcommand` class. You should |
| 177 | +provide descriptions of those test cases. The test case descriptions should include: |
| 178 | + |
| 179 | +1. A test ID, for easy reference later. |
| 180 | +2. A description of all fixtures, test values and expected values. |
| 181 | + |
| 182 | +If you need to make any reasonable assumptions in order to derive your characteristics or test cases, |
| 183 | +state clearly what they are. |
| 184 | + |
| 185 | +**Submission**: This should be a section in your report, and be given the heading "Task 5.2". |
| 186 | + |
| 187 | +## Task 5.3 -- Test implementation (4 marks) |
| 188 | + |
| 189 | +Write a test class using JUnit 5 called |
| 190 | +`SegmentSubcommandTest`. The test class should contain JUnit test methods |
| 191 | +for the `SegmentSubcommand` class, which implement the 3--4 test cases you described in Task 5.2. |
| 192 | + |
| 193 | +Your test cases should follow appropriate best practices for JUnit tests, including: |
| 194 | + |
| 195 | +- Your tests must properly "Arrange, Act and Assert" your test case. Tests that |
| 196 | + (for instance) contain no assertions will not be awarded marks. |
| 197 | +- Your test cases must be ones described in Task 5.2. For each test, |
| 198 | + include Javadoc documentation providing the test ID from Task 5.2 |
| 199 | + that it corresponds to. |
| 200 | + |
| 201 | +Your code should compile using a recent version of the Java Development Kit |
| 202 | +and the JUnit libraries. (You may assume that the current Long-Term Support release of the |
| 203 | +Java Development Kit, JDK 21, is acceptable, as is the current version of the JUnit Jupiter |
| 204 | +library, 5.13.4.) |
| 205 | + |
| 206 | +**Submission**: You should submit your `SegmentSubcommandTest` Java code via Moodle. |
| 207 | +Refer to the Moodle site for further submission details. |
| 208 | + |
| 209 | +## Task 5.4 -- Test quality (3 marks) |
| 210 | + |
| 211 | +Explain how you assessed the quality of the tests from Task 5.3 (word limit: 500 words). |
| 212 | + |
| 213 | +You should include links to your GitHub repository (to specific pull requests, issues, |
| 214 | +commits, etc.) which demonstrate the tests being reviewed for quality. |
| 215 | + |
| 216 | +**Submission**: This should be a section in your report, and be given the heading "Task 5.4". |
| 217 | + |
| 218 | +<!-- |
| 219 | + vim: tw=94 |
| 220 | +--> |
0 commit comments