Describe a process for identifying test cases for classes

Assignment Help JAVA Programming
Reference no: EM132310483

JAVA Assignment -

1. JUnit tests - You are given an API for two classes to be used in a mobile navigation app which plans bus journeys taken by users. The first, TravelStop, represents the location of bus stops. The second, RoutePlanner, allows a start and end location to be specified (these may be selected by the user from a map, but we are not concerned with how that happens), and optionally, a desired leaving time and arrival time.

'Skeleton' classes, with Javadoc documentation, are provided.

A .zip file containing the provided code can be attached.

Tasks -

a. In your report, identify at least two preconditions and two postconditions of methods in the TravelStop and RoutePlanner classes. (Half a page, maximum.)

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.)

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.)

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.

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.)

2. Alloy model - For this portion of the project, you will need to write an Alloy model for use in specifying the RoutePlanner system.

Tasks -

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.

Report requirements - Your report should be in PDF format. Any diagrams, charts or tables used must be legible and large enough to read.

Attachment:- Assignment Files.rar

Reference no: EM132310483

Questions Cloud

Shares of stock at the current stock price : Looking forward to next year, if Digby's current cash balance is $20,201 (000) and cash flows from operations next period are unchanged
Review Ford Motor Company Form 10-K : Review Ford Motor Company's Form 10-K. Explain the purpose of a company's 10-K and how it interprets the firm's financial strength.
Ethical decision in todays technologically driven society : MN501 - Network Management in Organisations - Ethical issues arising from use of ICT technologies - Why is it so difficult to make an ethical decision in today
Write about any connections that the article had : Write about any connections that the article had to your personal (your own experiences learning to read) and/or professional life (what have you observed).
Describe a process for identifying test cases for classes : JAVA Assignment - JUnit tests - Describe a process for identifying test cases for the classes - what techniques would you use
Discuss two critical benefits of collaboration : Increasingly, more students are receiving some form of special education services in public schools around the United States. Collaboration between special.
Nissan exposure to future disruptions : How will the operational changes announced in 2012 affect Nissan's exposure to future disruptions? How will it affect its steady-state operations?
Develop around the organization : What are the ethics J.Crew business relationships internal develop around the organization, briefly describe the issues.
Discuss three factors that can cause racial minority : There are many students in classrooms today who are gifted and talented, yet are not working to their full potential. Poverty is certainly one factor.

Reviews

len2310483

5/23/2019 12:07:41 AM

Report requirements - Your report should be in PDF format, and use A4 size pages. The font for body text should be between 9 and 12 points. It should contain numbered headings, with useful heading titles. Any diagrams, charts or tables used must be legible and large enough to read. All pages (except the cover, if you have one) should be numbered. If you give scholarly references, you may use any standard citation style you wish, as long as it is consistent. Cover sheets, diagrams, charts, tables, bibliographies and reference lists do not count towards any page-count maximums.

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd