Java Test Classes | Java

Home Recent Questions Java Test Classes | Java


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]

Search Here

Latest Reviews

  • Marcus
    30 Apr, 2019

    My assignment help services are provided in the best way by this website. The writers have completed my assignment in such a way that they helped me increase my overall performance.

  • Emy
    29 Apr, 2019

    Awesome work done by the experts of this company. I visited this site to get math assignment completed. My assignment was complete in every aspect. Thanks to the professionals who provided assignment writing help.

  • Darina
    25 Apr, 2019

    All thanks to the writers of Assignment Help 4 Me who completed my Physics assignment in the right manner. The structure of the assignment was totally customized according to my needs and that too at cheap prices.

View All Reviews


Assignment Help 4 Me