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
vodka [1.7K]
3 years ago
6

Consider the following line of code: if (x < 12 || (r – 3 > 12)) Write three valid mutants of this ground string (based on

the rules of the Java/C# language), followed by three invalid mutants. You must use a different mutant operator for each mutant you create – list the abbreviation for the operator used next to each line (for example, write "ROR" if you used a Relational Operator Replacement).
Computers and Technology
1 answer:
Nata [24]3 years ago
4 0

Answer:

See explaination

Explanation:

Mutation Testing:

Mutation Testing is a type of software testing where we mutate (change) certain statements in the source code and check if the test cases are able to find the errors. It is a type of White Box Testing which is mainly used for Unit Testing. The changes in the mutant program are kept extremely small, so it does not affect the overall objective of the program.

We say a mutant is valid if it is syntactically correct. We say a mutant is useful if, in addition to being valid, its behavior differs from the behavior of the original program for no more than a small subset of program test cases.

VALID MUTANTS

1. if (x < 12 && (r – 3 > 12)) LOR

2. if (x < 12 || (r – 3 < 12)) ROR

3. if (x < 12 || (x – 3 < 12)) IVR

INVALID MUTANTS

1. if (x < 12 ||(r – 3 > 12) UPR

2. if (x < 12 (r – 3 < 12)) MLO

3. (x < 12 || (x – 3 < 12)) CSM

Note:

LOR: LOGICAL OPERATOR REPLACEMENT

ROR: RELATIONAL OPERATOR REPLACEMENT

IVR: INVALID VARIABLE REPLACEMENT

UPR: UNBALENCED PARANTHISIS REPLACEMENT

MLO: MISSING LOGICAL OPERATOR REPLACEMENT

CSM: CONTROL OPERATOR MISSING REPLACEMEN

You might be interested in
Protocol 2 - Check for Errors
Lapatulllka [165]

Please note that the Problem to be solved from Protocol 1 is not provided hence the general answers. To construct and send, open a network environment a single multi-packet message, simply click "Add Packet" and then click "Send at Once".

<h3>How will the receiver know the order of the packets or if any are missing?</h3>

If the text or message sent does not make any reading sense, or if certain words are jumbled and out of place, then it is clear that something is wrong.

If the messages arrive in a coherent fashion, then the packet was fully received.

<h3>How will the receiver request missed packets and what will the sender do in response?</h3>

Where the users are familiar with the Transmission Control Protocol, lost packets can be detected when there is a timeout. Lost packets are referred to as Dropped packets.

Learn more about Packets at:
brainly.com/question/17777733

7 0
1 year ago
Which of the following method calls are legal?a. mathMethod(x);b. mathMethod(y);c. mathMethod(x, y);d. mathMethod(x + y);e. math
Roman55 [17]

Answer:

Option a, b, d, f, and j is legal method calls.

Explanation:

In the given question some information is missing, that is the method definition which can be described as follows:

Method definition:

int x =2, y=3; //defining integer variable

int mathMethod (int x)  //method definition

{//method body

int z=x+y; //calculate value

return z;  //return value

}

In the given question option a, b, d, f, and j  is legal, because these options follow the correct syntax, and other option were incorrect which can be defined as follows:

  • In option c, It is illegal because it accepts only one parameter.
  • In option e, It is accepts long number, that's why it is illegal.
  • In option g, It accepts float value, that's why it is illegal.
  • In option h, It doesn't accepts any parameter.
  • In option i, It isn't use in method.
7 0
3 years ago
You try to enter your name into a cell that accepts a numeric value. What error would you receive? A. #NAME B. #VALUE C. #REF D.
UNO [17]

Answer:

<h2>Option B: #VALUE</h2>

is the correct answer.

Explanation:

<h3>Reasons of #VALUE error:</h3>
  • When cells are not given the expected type of value.
  • If cells are left blank unnoticeable or for giving a null value.
  • For entering dates and other numerical data in text form.
<h3>Correcting and fixing #VALUE error:</h3>

This type of error can only be fixed by finding the cell in which there is wrong data entered and correct it.

Fixing the #VALUE error is tricky as some functions automatically ignore the data that is invalid.

<h3>EXAMPLE:</h3>
  • Suppose a cell contains the value as cost of the object and in order to make it 0, NA is inserted into the cell.
  • While making total of all the costs, that particular cell might cause #VALUE error.
  • Following image attach will help you clear the concept.

I hope it will help you!

4 0
3 years ago
Read 2 more answers
Frank is preparing a subsection of the SRS document that specifies data formats, data integrity, and storage capabilities. Which
Flauer [41]

The subsection which Frank is preparing for the SRS document that specifies data formats, data integrity, and storage capabilities is Logical Database Requirements.

<h3>What is SRS document?</h3>

SRS document of the software requirement specification document is the document which describes the function of a software and its procedure to perform a particular function.

Different types of requirement-

  • A. External Interface Requirements- This includes the interface of used, such as layout of screen, button etc.
  • B. Design Constraints- This includes the subcomponent of the system, such as performance requirement.
  • C. Inverse Requirements- It defines that what a system can not do.
  • D. Logical Database Requirements- Data of the user are saved in this such as profile, massage,data formats, data integrity, and storage capabilities etc.
  • E. Non-Functional Requirements-This includes attributes of system, performance, security etc.

Frank is preparing a subsection of the SRS document that specifies data formats, data integrity, and storage capabilities.

Thus, the subsection which Frank is preparing for the SRS document that specifies data formats, data integrity, and storage capabilities is Logical Database Requirements.

Learn more about the SRS document here:

brainly.com/question/26161636

#SPJ1

4 0
2 years ago
Write a program that calculates the future value of an investment at a given interest rate for a specified number of years. The
baherus [9]
<h2>Question:</h2>

Write a program that calculates the future value of an investment at a given interest rate for a specified number of years. The formula for the calculation is as follows:

futureValue = investmentAmount * (1 + monthlyInterestRate) ^ years * 12

Note: Allow users to enter the values of the investmentAmount, monthlyInterestRate and years from standard input.

Assume the number of years is always a whole number.

<h2>Answer:</h2>

===================================================

//import the Scanner class

import java.util.Scanner;

//Class header definition

public class FutureValue{

   

    //Main method definition

    public static void main(String []args){

       

       //Create an object of the Scanner class

       Scanner input = new Scanner(System.in);

       

       //Prompt the user to enter the investment amount

       System.out.println("Enter the investment amount");

       

       //Store the input in a double variable called investmentAmount

       double investmentAmount = input.nextDouble();

       

       //Next, prompt the user to enter the interest rate

       System.out.println("Enter the interest rate in percentage");

       

       //Store the input in a double variable called interestRate

       double interestRate = input.nextDouble();

       

       //Convert the interest rate to decimal by multiplying by 0.01

       interestRate *= 0.01;

       

       //Convert the interest rate to monthly interest rate by dividing the

       //result above by 12

       double monthlyInterestRate = interestRate / 12;

       

       //Prompt the user to enter the number of years

       System.out.println("Enter the number of years");

       

       //Store the input in an integer variable called years

       int years = input.nextInt();

       

       //Using the given formula, find the future value

      double futureValue =  investmentAmount * Math.pow(1 + monthlyInterestRate, years * 12);

       

       //Print out the future value

      System.out.println("Future value : " + futureValue);

       

    } //End of main method

     

}  // End of class definition

===================================================

<h2>Sample Output</h2>

===================================================

<em>>> Enter the investment amount </em>

1000

>> <em>Enter the interest rate in percentage </em>

10

>> <em>Enter the number of years </em>

5

Future value : 1645.3089347785854

===================================================

<h2>Explanation:</h2>

The code above has been written using Java. The code contains comments explaining every line of the code. Please go through the comments. The actual lines of code have been written in bold-face to distinguish them from comments. A sample output has also been provided as a result of a run of the code.

8 0
3 years ago
Other questions:
  • Question 4 (2 points)
    6·2 answers
  • The part of the poppet valve that contacts the valve seat is called the A. face. B. margin. C. head. D. stem.
    6·2 answers
  • 8) The higher the drag coefficient, the_____ the car will go<br> a)Siower<br> b)Faster
    9·2 answers
  • Which of the following information would best be displayed throughout the use of a time line
    11·1 answer
  • Explain in a few sentences the difference between analytical papers and argumentative papers.
    8·2 answers
  • This matches the domain name with the correct IP address:
    12·1 answer
  • How does the system work for this:
    15·2 answers
  • If the list [8,1,4,2,10,0] is sorted with the selection sort algorithm, what is the list at the 4th step of the algorithm?
    13·1 answer
  • As of 2019, approximately how much of the world population actively access the internet?
    7·1 answer
  • Smallest kind of computer
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!