Question
1. An automated tram transports passengers around a section of city. At any point in time, it can take the following actions: It can hold
1. An automated tram transports passengers around a section of city. At any point in time, it can take the following actions:
It can hold its position and do nothing,
It can open or close its doors, or
It can travel one block along a street.
You will write one method for the tram, the method that analyzes a situation and chooses the next action to take according to a specification. (The link of tram specification http://cse.unl.edu/~soft160/tram_specification.pdf)
For example, suppose that a tram following the local route is at the coordinates (2, 2) having just closed its doors and that it arrived there from the north. According to the linked specification, its next action should be to travel one block to the south.
Using the tram specification and the method signature of the act method stub in Tram.java, apply the category-partition method to the act method. Besides partitions for parameters or combinations of parameters of your own design, also include the following categories and partitions:
The tram's position is:
on the edge of the service area or
in the middle of the service area.
The expected output is that:
the tram holds position,
the tram closes its doors,
the tram opens its doors,
the tram travels one block east,
the tram travels one block north,
the tram travels one block west, or
the tram travels one block south.
Create a table documenting a test suite that achieves one-way category coverage. Each row of your table should include a test name (use descriptive camel-case names for each test), a test frame (a set of compatible choices for each category), and a corresponding test case (the name of the code under test, concrete inputs, and an oracle).
Clone the tram https://git.unl.edu/bgarvin/tram_homework
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started