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

  • Kannon
    13 Jul, 2019

    I asked for essay help from Assignment Help 4 Me and I am happy that the essay writers completed my task on time. The prices they asked for are worth in comparison to the services rendered.

  • Liam
    13 Jul, 2019

    Assignment Help 4 Me is the best help provider. I took assistance to get my essay completed and I am glad that the writers delivered the quality content as they promised within the time committed.

  • Silas
    12 Jul, 2019

    Accounting is a very interesting subject but when it comes to assignment writing, I feel hard to get through the same. But, since the assignments have to be completed somehow, I preferred to avail online help from Assignment Help 4 Me. All thanks to them that they helped me complete my work on time at reasonable prices.

View All Reviews


Assignment Help 4 Me