[SOLVED] CSE308 Assignment 4-Writing Test Scripts

30.00 $

Category: Tags: , , , , ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Offline-4-aedw7h.zip (1037.1 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (2 votes)

Writing Test Scripts

Write a function that receives total mark of a subject and calculates the grade for that. For a 3 credit subject, if one gets total mark in between 240 to 400 (inclusive), s/he will get A. For mark in between 210 to 239, s/he will get B and in between 180 to 209, will get C. For a mark less than 180, s/he will fail (receive F grade). For a 4 credit subject the range of marks for A, B, and C are 320-400, 280-319, 240- 279, respectively. Any mark less than 240 will earn F grade. Note that any fractional mark will be rounded up to next integer value.

You are to do unit test by writing a test driver using any programming language. You have to use J-Unit for testing.

Test outcome will be successful by checking the following:

  1. i)  Correct grade is calculated for any valid input.
  2. ii)  Proper message is shown for any invalid input.

You have to write the test script for generating the following categories of test data:

  1. i)  Mark to test each grade.
  2. ii)  Boundary values (fractional) for each grade.
  3. iii)  Invalid numbers that exceed lower and upper bound.
  4. iv)  Non-number input.

You will get bonus mark if you can add more test cases in addition to the abovementioned ones.

  • Offline-4-aedw7h.zip