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
You manage a small LAN for a branch office. The branch office has three file servers and few client workstations. You want to us
lana66690 [7]

You manage small LAN for a branch office. The branch office has three file servers and few client workstations. You want to use Ethernet device and offer guaranteed bandwidth to each server. You design the network by <u>connecting all network devices to a switch. Connect each server to its own switch port.</u>

<u></u>

Explanation:

  • A local-area network (LAN) is a computer network that spans a relatively small area.
  • Most often, a LAN is confined to a single room, building or group of buildings, however, one LAN can be connected to other LANs over any distance via telephone lines and radio waves.
  • The LAN is the networking infrastructure that provides access to network communication services and resources for end users and devices spread over a single floor or building.
  • Designing a LAN for the campus use case is not a one-design-fits-all proposition.
  • If there is a single 48-port switch, 47 devices can be supported, with only one port used to connect the switch to the rest of the network, and only one power outlet needed to accommodate the single switch

8 0
3 years ago
In computer science how can you define "copyright, designs and patents act 1988"?​
Natali5045456 [20]

Answer:

:)

Explanation:

Copyright Designs and Patents Act

The Copyright Designs and Patents Act (1988) gives creators of digital media the rights to control how their work is used and distributed. ...

Anything which you design or code is automatically copyrighted and may not be copied without your permission, as the digital creator.

5 0
2 years ago
.Write a C++ program that displays your name and address (if you value your privacy, a fictitious name and address).
olga_2 [115]

Answer:

#include <iostream>

using namespace std;

int main() {

   cout<<"My name is Rajat Sharma"<<endl<<"My address is Flat no=23 GH=5 Paschim Vihar New Delhi 110087 India"<<endl;

return 0;

}

Explanation:

The program is written in C++ language.In the program I have used cout to print my name and the address.First the name will be printed then the address in the new line endl is used for new line.To print any sentence just put them in double quotes.The same sentence in the program will be printed on the screen.

5 0
3 years ago
How does Mixed Reality expand on Augmented Reality?
taurus [48]

Mixed Reality expand on Augmented Reality option d: by enabling real-time interaction between real and virtual objects.

<h3>How does mixed reality expand on augmented reality?</h3>

Mixed reality is known to be one that is made up of both augmented reality and that of augmented virtuality.

Note that Mixed reality is one that acts so as to make an environment with interactive kinds of digital objects. Augmented reality needs a screen to be able to experience the augmented experience. Mixed reality is said to be experienced via the a headset.

Hence, Mixed Reality expand on Augmented Reality option d: by enabling real-time interaction between real and virtual objects.

Learn more about Augmented Reality from

brainly.com/question/9054673

#SPJ1

3 0
2 years ago
How many panes can Pablo view in a spreadsheet if he chooses the split worksheet option?
ddd [48]
Pablo can be a minimum of two pains and a maximum of four panes in a split screen worksheet.
6 0
2 years ago
Read 2 more answers
Other questions:
  • Which service is enabled on a cisco router by default that can reveal significant information about the router and potentially m
    10·1 answer
  • Graphs and charts are two different elements. True or False
    15·1 answer
  • Fred wants to analyze his spending habits of the past few years and has gathered information on the checks he has written from 2
    6·1 answer
  • __________ is a growing practice in cooperative farmingassociations to pool and sell the fruit as a common commodity underthe br
    6·1 answer
  • What is data analysing data and give three examples ?​
    9·1 answer
  • Which types of scenarios would the NETWORKDAYS function help calculate? Check all that apply.
    15·1 answer
  • Npesta kenos reaction
    13·2 answers
  • Does "remainder of x from y" mean xmody?
    5·1 answer
  • The __________ algorithm takes the ciphertext and the secret key and produces the original plaintext
    11·1 answer
  • Question 3 of 10<br> What was the fly in the ointment of Timmy's friendship with Rollo?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!