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]
3 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]3 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
Type the correct answer in the box. Spell the word correctly. Which framework can be used to develop cross-platform applications
kaheart [24]

Answer:

Xamarin

Explanation:

Xamarin framework can be used to develop cross-platform applications.

5 0
3 years ago
Read 2 more answers
Which avenue may utilize video streaming, audio narration, print designs, and animation?
astra-53 [7]

Answer: is their any options to answer your question

Explanation:

4 0
3 years ago
Read 2 more answers
TCPDump is used by Wireshark to capture packets while Wireshark own function is:
galben [10]

Answer:

a. to provide a graphical user interface (GUI) and several capture filters

Explanation:

TcPDump is a command line tool used to capture packets. TcPDump is used to filter packets after a capture has been done. To control network interfaces, TcPDump need to be assigned root privileges. Data is represented in form of text

Wireshark provide a graphical user interface (GUI) and several capture filters. It is a graphical tool used in packet capture analysis. Data is represented in wireshark as text in boxes.

5 0
3 years ago
Which part of the Word application window should the user go to for the following activities?
garri49 [273]

<u>Answer:</u>

<u>Correct</u>

<u>Explanation:</u>

Indeed, the world application is a word processing software used by many professionals and students alike.

Read a document: To do this, the user should go to the document area  found at the top left corner of the tool bar.

Find the name of the document: By looking at the Title bar.

Change the way a document is viewed: The Ribbon area is located at the top right section of the screen near the minimize icon.

Find help to do a certain activity on word: Close to the Ribbon area there is a dialog box having the image of a bulb.

Go up and down to different parts of a document: By going to the scroll bar which found at the extreme right hand side (margin) of the page.

Determine the page number of the document: By going to the Status bar found at the bottom right of the page.

3 0
3 years ago
How do you open the two versions of internet explorer 10?
Crank
On which windows it's not hard just search it google i would help but i hadn't used computer since may
5 0
3 years ago
Other questions:
  • Chris has just graduated from high school. He hopes to complete a carpenter's apprenticeship and eventually open his own busines
    9·2 answers
  • What kind of operating system is Windows? Command-line Browser based Graphical user interface Linux-based
    10·2 answers
  • Side mirror using convex mirror or concave mirror?​
    5·2 answers
  • Is 37 words per minute when typing an okay grade?
    15·2 answers
  • The operating system of a computer is an example of ________ software. science-forum
    7·1 answer
  • How is a ink pen better than a digital pen.
    8·1 answer
  • It is important to name your files in a variety of formats. true or false
    15·2 answers
  • Why use LinkedIn automation for LinkedIn?
    10·1 answer
  • Differentiate between refraction of light and reflection of light
    8·2 answers
  • Can you exclude header rows from sort in excel?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!