a.In your report, identify at least two preconditions and two postconditions of methods in the TravelStop and RoutePlanner classes. (Half a page, maximum.) [5 marks]
b.Describe a process for identifying test cases for the classes – what techniques would you use? – and your reasoning process for identifying at least two test cases for each class. Describe what sort of tests they are – are they unit tests, integration tests, or system tests, for instance? (Two pages, maximum.) [5 marks]
c.Identify three further test cases for each class, but you need only give a brief rationale – you need not give your reasonings process in detail. (Two pages, maximum.) [5 marks]
d.Implement five of your tests as JUnit tests, in the test class skeletons provided. Your tests should be given meaningful names, should include explanatory comments explaining their purpose, and any details of how they operate. You do not necessarily need to fill in or use the stub methods provided in the classes; delete any you do not use. [5 marks]
e.Discuss how you would decide when you have written enough tests for the two classes, and how you might identify any further tests that are needed. (One page, maximum.) [5 marks]
2. Alloy model
For this portion of the project, you will need to write an Alloy model for use in specifying the RoutePlanner system.
Write code for signatures and facts which will do the following:
Declare the existence of a “travel stop” type.
Declare the existence of a “route” type, which consists of an ordered sequence of travel stops.
Declare the existence of a “time” type, representing time of day.
We will assume that routes always represent routes suggested by a planner app (rather than simply “possible” routes).
Include an assertion that a route from starting stop A to ending stop B has exactly the same number of items in it as the reverse trip.
Include an assertion that a route from any stop to itself consists of only one stop.
Include explanatory comments in your model code. [15 marks]