Question

In: Computer Science

What is a Test Case? Write the Test cases for a 4X4 queen’s problem.

What is a Test Case? Write the Test cases for a 4X4 queen’s problem.

Solutions

Expert Solution

Test cases are different sets of inputs used to find the correctness of your program.

Like if your program is to print numbers till user input.Then the user inputs 1,4,5,6 or anything is a test case because it is testing your program against these inputs.

A 4*4 queen;s problem is a problem where we need to place 4 queens in a 4*4 crossboard such that no two queens attack each other.

So basically its the arrangement of queens we need to do

1-
 0  0  1  0 
 1  0  0  0 
 0  0  0  1 
 0  1  0  0 

2-
 0  1  0  0 
 0  0  0  1 
 1  0  0  0 
 0  0  1  0 
3-
 0  0  1  0 
 1  0  0  0 
 0  0  0  1 
 0  1  0  0 

4-
 0  1  0  0 
 0  0  0  1 
 1  0  0  0 
 0  0  1  0 

These are the arrangements for 4*4 queens problem . Just check if the matrix printed by the coder is one of the 4 mentioned above matrices.

If yes then show test cases passed

else show your code is incorrect.

Hope you like the solution.

please do thumbs up!


Related Solutions

Problem Description: What is a test case? What are the characteristics of a good test case?...
Problem Description: What is a test case? What are the characteristics of a good test case? What is a driver? What is a stub? With what type of test is each most closely associated?
Objectives: • Learn to write test cases with Junit • Learn to debug code Problem: Sorting...
Objectives: • Learn to write test cases with Junit • Learn to debug code Problem: Sorting Book Objects Download the provided zipped folder from Canvas. The source java files and test cases are in the provided folder. The Book class models a book. A Book has a unique id, title, and author. The BookStore class stores book objects in a List, internally stored as an ArrayList. Also, the following methods are implemented for the BookStore class. • addBook(Book b): sto...
Design the Use Case Diagram and the test cases for Online Mobile Store Use Cases Phase...
Design the Use Case Diagram and the test cases for Online Mobile Store Use Cases Phase II
description 
 Example: Online Computer Store Requirement 1 – Laptops Requirement 2 - Desktops Requirement 3 - Mainframes Use Cases Testing phase 2 Requirement 1 - Laptops - Test case Requirement 2 - Desktops Requirement 3 - Mainframes
What is a test case? What are the characteristics of a good test case? What is...
What is a test case? What are the characteristics of a good test case? What is a driver? What is a stub? With what type of test is each most closely associated?
Write a Case Brief on one of the following cases in a similar format to the...
Write a Case Brief on one of the following cases in a similar format to the example case brief below. (Please write in format where I can copy and paste) Case 22.1 Contemporary Cars, Inc. v. National Labor Relations Board. Case 22.2 Staffing Network Holdings, LLC v. National Labor Relations Board. Case 22.3 Unite Here! Local 5 v. National Labor Relations Board. EXAMPLE CASE BRIEF: Rael v. Cadena, 93 N.M. 684, 604 P.2d 822 (Ct. App. 1979) Parties: Eddie Rael,...
Write the test cases for searching flights in a flight reservation system. What testing method can...
Write the test cases for searching flights in a flight reservation system. What testing method can be used?
Cross-number problem (fill in the missing amounts in the cases below, each case is independent) Case...
Cross-number problem (fill in the missing amounts in the cases below, each case is independent) Case Units Sold Sales Variable Expenses Contribution Margin per unit Fixed Expenses Net Income 1 ? $100,000 ? 10 32,000 8,000 2 6,000 300,000 ? ? 100,000 (10,000) Case Sales Variable expenses Average contribution margin (percent) Fixed expenses Net Income (loss) 3 $500,000 ? 20 ? $7,000 4. ? ? 60 130,000 20,000
Cross-number problem (fill in the missing amounts in the cases below, each case is independent) Case...
Cross-number problem (fill in the missing amounts in the cases below, each case is independent) Case Units Sold Sales Variable Expenses Contribution Margin per unit Fixed Expenses Net Income 1 ? $100,000 ? 10 32,000 8,000 2 6,000 300,000 ? ? 100,000 (10,000) Case Sales Variable expenses Average contribution margin (percent) Fixed expenses Net Income (loss) 3 $500,000 ? 20 ? $7,000 4. ? ? 60 130,000 20,000
A) Many test cases. For each case, the first line is the number N that indicates...
A) Many test cases. For each case, the first line is the number N that indicates the amount of the students in the database. Next to several N lines are the information of each student, include student ID, name, gender, and age. And then will receive a number M that indicates there will be M search. For each search line is an ID number, you need to compare to the database if there is any student with that ID. If...
Implement a 4x4 multiplier using gate level (verilog code and test bench)
Implement a 4x4 multiplier using gate level (verilog code and test bench)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT