1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Elanso [62]
2 years ago
12

The purpose of this assignment is to determine a set of test cases knowing only the function’s specifications, reported hereaf

ter:The program takes as input a 2D matrix with N rows. The program finds the column index of the first non-zero value for each row in the matrix A, and also determines if that non-zero value is positive or negative. It records the indices of the columns, in order, in the array W. It records whether each value was positive or negative, in order, in the array T (+1 for positive, -1 for negative). Assume that all rows have at least one column with a non-zero value.As this is black-box testing, you will not have access to the source so you must use what you have learned.You need to include a comment that describes how you chose your test cases.Students should identify the input equivalence partitions classes and select test cases on or just to one side of the boundary of equivalence classes.Students will gain 25 points for each input equivalence partition classes and valid test cases reported.Any language can be used, preferably C or C++ but it's not an issue if it's not in these two. Thanks!
Computers and Technology
1 answer:
Nesterboy [21]2 years ago
5 0

Answer:

The program is written using PYTHON SCRIPT below;

N=int(input(" Enter number of Rows you want:"))

M=[] # this for storing the matrix

for i in range(N):

l=list(map(int,input("Enter the "+str(i+1)+" Row :").split()))

M.append(l)

print("The 2D Matrix is:\n")

for i in range(N):

print(end="\t")

print(M[i])

W=[] # to store the first non zero elemnt index

T=[] # to store that value is positive or negative

L=len(M[0])

for i in range(N):

for j in range(L):

if (M[i][j]==0):

continue

else:

W.append(j) # If the value is non zero append that postion to position list(W)

if(M[i][j]>0): #For checking it is positive or negative

T.append(+1)

else:

T.append(-1)

break

print()

print("The first Non Zero element List [W] : ",end="")

print(W)

print("Positive or Negative List [T] : ",end="")

print(T)

Explanation:

In order for the program to determine a set of test cases it takes in input of 2D matrix in an N numbet of rows.

It goes ahead to program and find the column index of the first non-zero value for each row in the matrix A, and also determines if that non-zero value is positive or negative. The If - Else conditions are met accordingly in running the program.

You might be interested in
RDBMS stands for_________________
Aliun [14]
The term "RDBMS" stands for <span>relational database management system. 

I hope this helped! :)</span>
4 0
3 years ago
What was the strategy the company adopted for ERP implementation?
SashulF [63]

Answer:

Big Bang or Phased Approach – ERP Implementation strategies include Big Bang, Phased, Hybrid, and Parallel Adoption. Each organization requirements are different and as such, the project management method is itself evolving using PPM, SCRUM, and DevOps.

8 0
2 years ago
Mark for review (Will be highlighted on the review page) 3. Which one of the following word processing features saves you the mo
Maksim231197 [3]
B- find and replace can replace any word in the document with another.

7 0
3 years ago
Write a series of conditional tests. Print a statement describing each test and your prediction for the results of each test. Fo
N76 [4]

Answer:

this:name = 'John'

print("Is name == 'John'? I predict True.")

print(name == 'John')

print("\nIs name == 'Joy'? I predict False.")

print(car == 'Joy')

this:age = '28'

print("Is age == '28'? I predict True.")

print(age == '28')

print("\nIs age == '27'? I predict False.")

print(age == '27')

this:sex = 'Male'

print("Is sex == 'Female'? I predict True.")

print(sex == 'Female')

print("\nIs sex == 'Female'? I predict False.")

print(sex == 'Joy')

this:level = 'College'

print("Is level == 'High School'? I predict True.")

print(level == 'High School')

print("\nIs level == 'College'? I predict False.")

print(age == 'College')

Conditions 1 and 2 test for name and age

Both conditions are true

Hence, true values are returned

Conditions 3 and 4 tests for sex and level

Both conditions are false

Hence, false values are returned.

7 0
3 years ago
Who is credited with writing Google's famous page ranking search algorithm?
vaieri [72.5K]
Larry page is the correct answer :)
4 0
2 years ago
Other questions:
  • Exit network systems, information support, and software development are all careers in which career cluster?
    10·1 answer
  • Help me please (program c++)
    11·1 answer
  • Angle, oblique, regular, demi, roman, heavy, extra bold, expanded, and compressed are ___________ . Select one: A. type styles B
    10·1 answer
  • Your baby brother has found the hammer and is eagerly eyeing one of the boxes. Describe and analyze an algorithm to determine if
    15·1 answer
  • If you're unsure of what chart to use for a set of data, what feature does Excel include that will help you to decide?
    7·1 answer
  • Just answer in five-line. Question:
    9·1 answer
  • Write a test program that prompts the user to enter three sides of the triangle (make sure they define an actual triangle), a co
    5·1 answer
  • You are now going to prepare some reports for the company. Measurements are in metres and volume
    7·1 answer
  • Pls say correct guyz pls pls pls
    7·1 answer
  • A eclipse occurs at a full moon when the moon passes between earth and the sun
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!