Question

In: Computer Science

1 Consider a program for the determination of Previous date. Its input is a triple of...

1 Consider a program for the determination of Previous date. Its input is a triple of day, month and year with the values in the range

1 ≤ month ≤ 12

1 ≤ day ≤ 31

2000 ≤ year ≤ 2125

The possible outputs are “Previous date” and “Invalid input date”.

Design the test cases using the following:

  1. [50 Marks] Decision table-based testing.
  2. [50 Marks] Design the worst-case testing.

Show the full details to apply the testing part

Solutions

Expert Solution

Scenario given for testing:

Consider a program for the determination of Previous date. Its input is a triple of day, month and year with the values in the range

1 ≤ month ≤ 12

1 ≤ day ≤ 31

2000 ≤ year ≤ 2125

The possible outputs are “Previous date” and “Invalid input date”.

1] Decision table-based testing.

Decision table built in this testing method is a tabular representation of inputs versus rules/cases/test conditions.

Conditions Rule 1 Rule 2 Rule 3 Rule 4 Rule 5 Rule 6 Rule 7 Rule 8
Day (T/F) F F F F T T T T
Month (T/F) F F T T F F T T
Year (T/F) F T F T F T F T
OUTPUT (P/I) I I I I I I I P

Legend:

T - Correct Input in given range (Day/Month/Year)

F - Wrong Input in given range (Day/Month/Year)

P - Previous Date (Expected output)

I - Invalid Input Date (Error message)

Interpretation:

Rule-8: Enter valid day, month, year and the expected result will be the user should get the previous date.

Rule-1 to Rule-7: Enter invalid day- month-year(one/two/all three invalid input) and the expected result will be the user should get an error message 'Invalid input date'.

2] Worst case testing

Here we consider cases where more than 1 variable has extreme values.

i.e.

1) Range: 1 ≤ month ≤ 12

In these test-cases, month variable can be given values 1, 2, 12, 11

(

minimum value in range - 1

close to minimum value in range - 2

maximum value in range - 12

close to maximum value in range - 11

)

2) Range: 1 ≤ day ≤ 31

day variable can be given values 1, 2, 31, 30

(

minimum value in range - 1

close to minimum value in range - 2

maximum value in range - 31

close to maximum value in range - 30

)

3) Range: 2000 ≤ year ≤ 2125

year variable can be given values 2000, 2001, 2125, 2124

(

minimum value in range - 2000

close to minimum value in range - 2001

maximum value in range - 2125

close to maximum value in range - 2124

)

These values can be used to set up the test cases for worst case testing.


Related Solutions

Write a program that takes a date as input and outputs the date's season. The input...
Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month and an int to represent the day. Ex: If the input is: April 11 the output is: Spring In addition, check if the string and int are valid (an actual month and day). Ex: If the input is: Blue 65 the output is: Invalid The dates for each season are: Spring: March 20 - June 20 Summer:...
Write a program in python that takes a date as input and outputs the date's season....
Write a program in python that takes a date as input and outputs the date's season. The input is a string to represent the month and an int to represent the day. Ex: If the input is: April 11 the output is: Spring In addition, check if the string and int are valid (an actual month and day). Ex: If the input is: Blue 65 the output is: Invalid The dates for each season are: Spring: March 20 - June...
In Java please: 5.23 LAB: Seasons Write a program that takes a date as input and...
In Java please: 5.23 LAB: Seasons Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month and an int to represent the day. Ex: If the input is: April 11 the output is: Spring In addition, check if the string and int are valid (an actual month and day). Ex: If the input is: Blue 65 the output is: Invalid The dates for each season are: Spring:...
Consider the linear program given below (almost the same as the previous problem - the only...
Consider the linear program given below (almost the same as the previous problem - the only difference is that the right hand side of the first constraint has been increased from 10 to 11): Decision variables: A, B, C, and D Objective: maximize 3 A + 5 B + C +2 D Constraints: A + B + C + D <= 11 A – B = 0 A + B – C – D <= 0 Solve it using Excel....
Ogelbay Hospital is updating its risk management program. It is currently at the risk determination step,...
Ogelbay Hospital is updating its risk management program. It is currently at the risk determination step, using the qualitative approach. Ogelbay Hospital is located in a flood plain. The facility has not had flooding in the past two years, but the nearby river overflows its banks every year. Although the city has discussed building a floodwall that would protect the hospital from the river, this is an expensive proposition. As a result, the only protection it has received up to...
Step 1: Your program will now take its input from this file instead of from the...
Step 1: Your program will now take its input from this file instead of from the user. Here's what you want to do: Remove the call to getUserInput(). You can also remove its definition and prototype if you like. For reasons that will become clear later, don't close the file until just before the return statement at the end of main. Run your code to make sure that the file is opened and read correctly. Hint: you may test the...
Consider this scenario, a company management is considering developing its next work planning using the triple...
Consider this scenario, a company management is considering developing its next work planning using the triple bottom line principles as its framework. 1/. Describe what triple bottom principles is? 2/. Describe/Explain in step by step process as how management can develop its next work planning framework using Triple Based Line Principles? (Within Australian Accounting Environment) (Please type up your answer)
The following graph input tool shows the daily demand for hotelrooms at the Triple Sevens...
The following graph input tool shows the daily demand for hotel rooms at the Triple Sevens Hotel and Casino in Las Vegas, Nevada. To help the hotel management better understand the market, an economist identified three primary factors that affect the demand for rooms each night. These demand factors, along with the values corresponding to the initial demand curve, are shown in the following table and alongside the graph input tool. (Note: All values are hypothetical.)Use the graph input tool...
Python Program 1: Write a program that takes user input in the form of a string...
Python Program 1: Write a program that takes user input in the form of a string Break up the string into a list of characters Store the characters in a dictionary The key of the dictionary is the character The value of the dictionary is the count of times the letter appears Hint: remember to initialize each key before using Output of program is the count of each character/letter Sort the output by key (which is the character) Python Program...
Question: Conversion Program * This program will ask the user to input meters * After input,...
Question: Conversion Program * This program will ask the user to input meters * After input, a menu will be displayed: * 1. Convert to kilometers * 2. Convert to inches * 3. Convert to feet * 4. Quit * * The user will select the conversion and the converted answer will be displayed. * The program should redisplay the menu for another selection. * Quit program when user selects 4. Hi, my instructor requirement fix the bug in the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT