软件工程代写 Microsoft Word

Microsoft Word – Ruby Assignment.docx

COM1001 – Introduction to Software Engineering – Semester 1, 2018

Individual Assignment – ‘Todo List’ Ruby Programming

1. Background

In this assignment, you will be applying the concepts practiced in the lab sessions over the semester on a Ruby programming example. This is an individual assignment, so you are required to work on this assignment on your own. Read these instructions carefully.

2. ATodo(task)List

The aim of this assignment is to implement a console based application to allow a list of ‘todo’ items (or tasks) to be entered using a simple text interface. The requirements have been split into different Stages.

You are provided with a starting framework that allows the following interaction, where here we can see a user add a todo to ‘Buy Milk’ and then list the current todos, then quit (currently – incorrectly – with ‘X’).

Todo List v0.01
:) A Buy Milk
:) L
 0: [0, "Buy Milk"]
:) A
 :| Nothing to Add - Try 'A todo description'
:) ??
Commands: Q-uit A-dd L-ist H-elp
:) Q
Commands: Q-uit A-dd L-ist H-elp
:) X

The program should show a happy 🙂 sad 🙁 or indifferent 😐 ‘face’ based on whether an error or warning (or not) is detected.

You are required to, at the least, commit a copy of each stage to Git (see following for more detail about the stages and later for version control).

COM1001 – Introduction to Software Engineering – Semester 1, 2018

3. Stage1–Tidyinitialframework

Some of the following have already been implemented, you will need to implement any missing/incomplete features to pass the tests for this stage:

Command Feature Marks
A<todo> adds a todo to the list 5
Q quits the application 5
L shows the current todo list – you must also change the list output to use the format (where ‘·’ means space): ··<line> (<priority>) <todo>
e.g. 0 (9) Buy Milk
8
Total 18

You must use the supplied framework to be able to gain the best marks – full marks are only awarded if tests pass.

Here is an example of an expected interaction – you will need to develop beyond this interaction to get the best marks:

Todo List v0.02
:) A Buy Donuts
:) A Learn Python
:) L
 0 (3) Buy Donuts
 1 (3) Learn Python
:) P9
:) A Attend IoC Talk from Industry
:) L
 0 (3) Buy Donuts
 1 (3) Learn Python
 2 (9) Attend IoC Talk from Industry

🙂 +1 🙂 L

 0 (3) Buy Donuts
 1 (4) Learn Python
 2 (9) Attend IoC Talk from Industry
:) =4
 1 (4) Learn Python
 2 (9) Attend IoC Talk from Industry

COM1001 – Introduction to Software Engineering – Semester 1, 2018

4. Stage2-Priority

Once Stage 1 is working, the following commands will need to be added:

Command Feature Marks
P<p> sets the priority for new todos to <p>, where <p> must be 0 to 9, otherwise report an error with ‘··:( Priority must be 0 to 9’ 10
+<l> increase the priority of the todo at line <l> 8
P Change P to show the priority with the form ‘··Priority is currently #’ where # is 0 to 9. 4
=<p> List all todos with priority p and higher 8
Total 30

Note: You are expected to make use of common methods for common functionality, e.g. checking the bounds for a change to priority. Please also see the marking scheme.

5. Stage3–Delete

Command Feature Marks
D<l> Deletes the todo at line <l> 10
Total 10

COM1001 – Introduction to Software Engineering – Semester 1, 2018

6. Stage4–List

You will need to split up your own stages for the following commands.

Command Feature Marks
L<find> List only todos that have <find> within them, if none are found, then output ‘··:| No matching Todos’ 5
L Push your code to git before trying this one… List all todos in highest priority order, i.e. starting with priority 9, going down to 0. The todo number should still increase in the list and must be consistent with other commands, such as deletion, e.g. 🙂 P0 🙂 APlay Darts 🙂 P3 🙂 A Watch Bakeoff 🙂 L 0 (3) Watch Bakeoff 1 (0) Play Darts 🙂 D0 🙂 L 0 (0) Play Darts Strong Hint: it is likely simpler (and more computationally efficient) to insert todos in the list based on priority 7
Total 12

7. Stage6-Tidy

8. Version Control

You must use a Git repository called individualassignment on GitLab (and a local repository) for implementing your assignment – this is particularly useful if you don’t use Codio, since you can push your code to Git and pull for Codio testing.

You should add K.Bogdanov and A.Stratton as Reporters to your repository as described in Codio Unit 10 – working with remote repositories.

Command Feature Marks
T Push your code to git before trying this one… Tidy the list by removing duplicates where the task is the same – keeping the higher priority task 16
Total 16

COM1001 – Introduction to Software Engineering – Semester 1, 2018

Keep all your source files in your remote Git repository, and make sure your local Git repository is synchronised with this remote repository (i.e. don’t just stage your work…commit it as well).

There have to be at least 5 commits in the repository. These commits need to have different time stamps (i.e. don’t make all commits together on the last day) and commits need to be non-trivial (i.e. no dummy commits). Commit to the repository whenever you have made progress with the implementation; i.e. use Git to keep track of success.

Only the last version of the source code will be used for marking; appropriate use of version control will be checked.

Total – 4 marks

9. Automated testing

Some baseline automated tests will be provided – one week into the assignment – this is to encourage you to focus on the requirements and to use Git to transfer your code across to a new Codio workspace.

You can use the baseline tests to verify the format of some of your outputs. Note that further tests will be performed as part of the marking process.

Generally, the baseline tests will check expected behaviour and a few exceptions/errors. The marking tests will also test for more exceptions, that you will need to deduce yourself.

10. Code Inspection

Your code will also be inspected and assigned grades for:

  1. Clarity (maintainability) – variable names, appropriate commenting,
  2. Structure – appropriate reuse of common code,
  3. Language use – appropriate use of language features. Total – 10 marks

11. Assignment Submission

You should use the Codio unit linked on MOLE to complete this assignment. You do not need to use Codio to develop the solution if you prefer to work with a different IDE on your computer, but you must use it to submit your solution. To submit your solution, mark the Codio unit as completed. Please see MOLE for the submission deadline, unless otherwise informed (e.g. by email from Kirill).

COM1001 – Introduction to Software Engineering – Semester 1, 2018

12. Late work

Late work will be penalised according to standard University procedure (a penalty of 5% per working day late; work will be awarded a mark of zero if more than 5 working days late). The hand-in time and date is taken to be the time of your marking the Codio unit as completed.

13. Plagiarism and collusion

You may discuss the assignment with each other, myself or a demonstrator, but ultimately this assignment must be completed individually.

Do NOT download and use code from the Internet. Do NOT share or use anybody else’s code. Anyone who cheats on this assignment will be dealt with and penalised through standard departmental and faculty procedures. You have been warned.

N.B. Attempts to ‘fake’ program functionality (e.g. printing out the correct answer regardless of the input) will result in reduced marks and further penalties may apply.