17- The goal of testing is to design a series of test cases that has a high likelihood of finding errors. O False O True
Q: If object a = new Object(); and object b = new Object(); , then a = b. O True O False
A: Answer is False.
Q: What will be output to the screen when the following code is executed: def PrintMe(x): try: return…
A: The problem is based on the basics of functions in python programming language.
Q: in the following code there is #include #include 1nt show () ; void ma in() int a; cout<<"K=; a-Show…
A: Step 1:- Introduction:- The given program is written in the c++ programming language. C++ is an…
Q: for (int i = = 0; i <= 8; i++) int squared = i * i; System.out.println (i + " + squared, 11 squared…
A: answer: variable scope error explanation: the variable which is declared inside a loop which can…
Q: 1. Generic code for N number of Employees (bor 2. Marks Distribution of the functions.
A: Solution:-- 1)As the given question is expecting the solution to be provided in the programming…
Q: Consider the following function in answering the questions below. int a, int b, int c; int temp; if…
A: There are two parts in this question, In first part we are asked to develop test input to cover 100%…
Q: er you correct all the errors check the output and make sure the code gives the desired output.…
A: Python code is below:
Q: Attached Question :
A: Since multiple questions have been posted at a single request, we will answer first question. If you…
Q: QUESTION 2 Implement the following: 1) Request a user input, login, from the console. 2) Print…
A: Python program to check the input string and return login incorrect or correct.
Q: The following statement is valid. double[] x = new double[0]; OTrue O False
A: This is a java programming question. The above statement is about declaring array . We need to…
Q: Given two variable x and y -Assume that the two variables have been given a value. If x>y Create…
A: Here, we have to swap 2 given numbers x and y when x>y. We can do it using a method and values…
Q: Enter Quizzes: 50 Enter Final Exam: 50 Enter Evaluation: 50 Sample Output Number Recitation Quizzes…
A:
Q: 6. Analyze the following code. int x = 0; if (x > 0); { System.out.println("x"); } a. The value of…
A: The Code in the question 6 prints x Output : Correct Answer : c. Symbol x is always printed
Q: Assume you work as a cashier in a restaurant. You must keep track of the amount of money your…
A: Solution:-- 1)The given question has required for the solution to be provided with the help of an…
Q: C++ program. Make sure it’s C++ not C. Write a procedure void fib(int N) which prints the first N…
A: Actually, program is an executable software that runs on a computer.
Q: ython Programming: Write a program using unittest.TestCase methods to confirm that the addition and…
A: Lets see the solution.
Q: int num = 0; System.out.println ("Song titles with numbers include: "); switch (num) { case 12:…
A: To do: What will the printout from given
Q: 1Modified (use an error metric of relative fractional error being less than 10-7 ). 2Modifed (use…
A: Hey there, I am writing the required solution of the questin mentioned above. Please do find the…
Q: T/F 4. The assertion is a legal stumbling block.
A: Given that, The assertion is a legal stumbling block.
Q: 1. Find the statement that causes the compilation error. 2. Determine the output if that statement…
A: Here we have a class A with one method. Next, we have another class B that extends A and also has…
Q: Question Completion Status: def printing(pattern, number): for i in range(number): print ("**")…
A: According to the Question below the Solution: Output:
Q: What is the output of the code shown below?class Truth: pass x=Truth() bool(x) a. pass…
A: If Truth() method is not defined, then object is considered true. So, the output of the code is…
Q: Question 9 2 pts What is the output of the following code? (NOTE: There are no spaces between the…
A:
Q: 3. A safe is locked by a combination of of four binary digits (that is, 0 or 1), but the owner has…
A: Answer (a).
Q: uppose, you are working in a company ‘X’ where your job is to calculate the profit based on their…
A: Note:- I am taking the Python part. Program: class FinalQ: def print(self,array,idx):…
Q: 1. Assume x is an int which has been declared and assigned a valid value. x guaranteed to change…
A: The given code is used the multiple if statement, in which control is evaluate both if statement…
Q: (ii) A variable x is declared as an integer. Is the assignment x <2.08 possible? Why br why not? If…
A: ii) A variable x is declared as an integer is the assignment x <--2.08 is possible? No it is not…
Q: n a classroom election, two presidential candidates, namely, Lisa and Teddy, both garnered the same…
A: We are given a situation where two candidates won by equal votes. To decide who will be president…
Q: After following statements have executed, find the value of the variable a. int a=2, i=0; while…
A: Here we are given with a = 2 and i = 0 Now we have a while loop whose condition is true till the…
Q: View the following code, and then answer how many times will this loop run? Enter the exact number…
A: while(ammo>4): The while loop will run while the value of the variable ammo is greater than 4…
Q: A truth table shows, for the various true or false values of boolean variables, what the result of a…
A: I have solved all the 8 parts of the truth table and have provided explanation along with it. We…
Q: 123 def verify(number): # do not change this line! # write your code here so that it verifies the…
A: Python Program: ##This is verify() function, it takes a string, number as input def verify(number):…
Q: public void Unknown() if
A: Given :
Q: Analyze the following code: int x = 55; boolean test; if (x % 5 == 0) test = true; else test =…
A: We are given logic of a code where we are going to pick the option which is not equivalent.
Q: int main() test10: test10); return 0; void test1 (0 static int x=23; int y = 8; X+=1; cout<<x<<"…
A: In given code , we can see that use a variable of special kind called as static variable which is…
Q: What is the probability that in a classroom of x people, at least 2 will be born on the same day of…
A: Introduction What is the probability that in a classroom of x people, at least 2 will be born on the…
Q: ation error. 2. Determine the output if that statement is removed. class A { public void test() {…
A: The statement that causes the compilation error. Determine the output if that statement is…
Q: How to attempt? Question : The Card Game One day, Fred and his N friends were playing a card game in…
A: Input Specification: input1: An integer N denoting the number of cards(1<=N<=500) input2: An…
Q: CHALLENGE 3.1.2: Reading multiple data types. ACTIVITY Type two statements. The first reads user…
A: Coded using Python 3.
Q: Find the errors in this code: double gpa[] = {2.2, 3.8, 4.0, 3.6, 1.7, 2.8}; int countSuper = 0;…
A: Find the errors in this code: double gpa[] = {2.2, 3.8, 4.0, 3.6, 1.7, 2.8}; int countSuper = 0; //…
Q: The result is negative when the dividend and divisor have not same sign. * O False True
A: Binary Coded Decimal, or BCD, is a telephone system or code that uses binary numbers or digits to…
Q: 2-Fully explain the following code and draw all possible outputs. Please input a number between 5…
A: Given code: <!DOCTYPE html> <html> <body> <p>Please input a…
Q: 9. consider the following code: int numCredit 75; string studentYear; if (numCredit > 90)…
A: If else is conditional statement which executes if statement based on true condition otherwise else…
Q: case 3: res=31;break; case 4: res-30;break; case 5: res=31;break; case 6: res-30;break; #include int…
A: #include <stdio.h> int main(){ int month; int days; printf("Enter month: ");…
Q: Analyze the following code: int x 55; %3D boolean test; if (x 5 = 0) test = true; %3D else test =…
A: The problem is based on boolean algebra, and the code checks if x is multiple of 5 or not. Option…
Q: Computer Science Write a code to take input as course name and generate absent report for all…
A: As no programming language name is mentioned I am doing this using java. Written code: import…
Q: 3, b = 1; if (! (а < 2 && а < b) System.out.print ("Right"); int a else System.out.print ("Wrong");
A: Output: Right
Q: 9. Is the expression "sue" != "fred" True or False
A: Given statement: "sue" != "fred" We have to check whether this statement is true or false.
Q: After following statements have executed, find the value of the variable a. int a=15; while (a>0)…
A: Answer: 0 Explanation: While loop: It is an entry control loop that checks the condition while…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- PROGRAMMING LANGUAGE: C++ ALSO PUT SCREENSHOTS WITH EVERY TASK. TASK 1 : A class of ten students took a quiz .The grades (integers are in range 0-100) for this quiz are available to you .Determine class average on quiz . TASK 2: Write c++ code that print summery of exam result and decide either student should have makeup class or not .If more then 30% of class fails in exam it’s mean they need a makeup class otherwise they don’t need any makeup class. For class strength take input from user (Hint: take two variables pass and fail) TASK 3: write a c++ that will determine whether a department-store customer has exceeded the credit limit on the charge account .For each customer , following facts are available : Account number (an integer) Balance at beginning of month Total of all items charged by this customer this month Total of all credit applied to this customer’s account this month. Allowed credit limit You are required to use a while structure to input each of these facts ,…Exercise 6 - Loaded Coin Simulation Make a new class in the Lab2 project called LoadedCoinSim that simulates the toss of a loaded coin. A coin is loaded when it is constructed such that it is more likely to land on one value than another. Assume the probability the coin will land head is HEAD_PROB, and declare that as a constant in your program. Initially, use a value of 0.75, which means 75% chance the coin will show heads. Given this probability, simulate ten coin tosses and displaying the result. At the end, display the number of times the coin showed heads. The output should appear like this: Toss 1: HEADS Toss 2: HEADS Toss 3: HEADS Toss 4: TAILS Toss 5: HEADS Toss 6: HEADS Toss 7: HEADS Toss 8: HEADS Toss 9: TAILS Toss 10: HEADS Number of heads = 8Explain which kind of test cases are written first: black boxes or white boxes, for example.
- Python tic tac toe. Tic tac toe is a very popular game. Only two players can play at a time. Game Rules Traditionally the first player plays with "X". So you can decide who wants to go with "X" and who wants to go with "O". Only one player can play at a time. If any of the players have filled a square then the other player and the same player cannot override that square. There are only two conditions that may match will be a draw or may win. The player that succeeds in placing three respective marks (X or O) in a horizontal, vertical, or diagonal row wins the game. Winning condition Whoever places three respective marks (X or O) horizontally, vertically, or diagonally will be the winner. Submit your code and screenshots of your code in action. Hints : Have a function that draws the board Have a function that checks position if empty or not Have a function that checks player or won or not expected output:Please use Python for this problem: Please make sure your code is in the correct format and please post a screenshot of the code from Python. When you are finished, test your solutions using a doctest: Develop a class Volume that stores the volume for a stereo that has a value between 0 and 11. Usage of the class is listed below the problem descriptions. Throughout the class you must guarantee that: The numeric value of the Volume is set to a number between 0 and 11. Any attempt to set the value to greater than 11 will set it to 11 instead, any attempt to set a negative value will instead set it to 0. This applies to the following methods below: __init__, set, up, down You must write the following methods: __init__ - constructor. Construct a Volume that is set to a given numeric value, or, if no number given, defaults the value to 0. (Subject to 0 <= vol <=11 constraint above.) __repr__ - converts Volume to a str for display, see runs below. set – sets the volume to…Q4: You are a teacher. You would like your students to use a software package, but the school's budget does not include enough money to buy copies for all the students. Your school is in a poor neighborhood, and you know most of the parents cannot afford to buy the software for their children. b) Suppose the methods you try do not work. Will you copy the software or decide not to use it? Give some arguments for and against your position. Explain why you think the arguments on your side are stronger
- Problem: Bugs are simple creatures that only know how to walk towards other bugs. Bugs maintain information about their (x, y) position; by which it can tell if they are standing next to other bugs. Watch the following video: bug movement. Create a java project that simulate bugs movement. You need to write a class “Bug" that models a bug moving along a straight line and it can turn to change its direction counterclockwise (i.e. 90 degree to the left; north → west → south → east → north). In each move, its position changes by one unit in the current direction. Details of the "Bug" class is described below. Your simulator should read information of an unknown number of “Bug" objects from an input file called “Bugs.txt". Each line represents a bug and the initial position and facing direction of this particular bug. Keeping the first bug position as a reference the simulator should move the second bug next to the first bug forming a cluster and its final position and direction should be…Alias is also known as a data type. True False We can use Hierarchy to combine two values of a dimension into a single category. True False ........... Which of the following can include multiple version of the same worksheet? * 0/2 Dashboard and stories Stories but not dashboards Dashboards but not stories Neither dashboards nor stories ......... A color gradient is used for which of the following * 0/2 Discrete measure Continuous measure Both continuous and discrete N/AIN JAVA Cartesian Item Programming Depiction of the test: The Cartesian result of two arrangements of numbers An and B is characterized as the arrangement, all things considered (a,b) where an is an individual from An and b is an individual from B. It is frequently addressed by the image A x B and is alluded to as the Cartesian item since it starts in Descartes' meaning of logical calculation. The Cartesian result of two arrangements of genuine numbers is as requested sets. for example An equivalents [1, 2, 3]. B approaches [4, 5]. C = [(1, 4), (1, 5), (2,4), (2.5), (3,4), (3,5)] is the Cartesian item. Presently, given a facilitate tuple (i,j), where I signifies A[i] and j indicates B[j], and knowing A, B, develop a capacity that profits the file of a part in Cartesian item C as per (i,j) Introduction code: Primary public class /** * Repeat over the information lines individually. */ IOException is tossed by open static void main(String[] args). new…
- Instructor note: Important Coding Guidelines: Use comments, and whitespaces around operators and assignments. Use line breaks and indent your code. Use naming conventions for variables, functions, methods, and more. This makes it easier to understand the code. Write simple code and do not over complicate the logic. Code exhibits simplicity when it’s well organized, logically minimal, and easily readable. A pedometer treats walking 1 step as walking 2.5 feet. Define a method named feetToSteps that takes a double as a parameter, representing the number of feet walked, and returns an integer that represents the number of steps walked. Then, write a main program that reads the number of feet walked as an input, calls method feetToSteps() with the input as an argument, and outputs the number of steps. Use floating-point arithmetic to perform the conversion. Ex: If the input is: 150.5 the output is: 60 The program must define and call a method:public static int feetToSteps(double…Exercises: PolymorphismProblem 1. VehiclesWrite a program that models 2 vehicles (Car and Truck) and will be able to simulate driving and refueling them inthe summer. Car and truck both have fuel quantity, fuel consumption in liters per km and can be driven givendistance and refueled with given liters. But in the summer both vehicles use air conditioner and their fuelconsumption per km is increased by 0.9 liters for the car and with 1.6 liters for the truck. Also the truck has a tinyhole in his tank and when it gets refueled it gets only 95% of given fuel. The car has no problems when refueling andadds all given fuel to its tank. If vehicle cannot travel given distance its fuel does not change.Input On the first line - information about the car in format {Car {fuel quantity} {liters per km}} On the second line – info about the truck in format {Truck {fuel quantity} {liters per km}} On third line - number of commands N that will be given on the next N lines On the next N lines –…1) Through BlueJ, the class must define a method called isSpace that allows the book club staff to determine whether there is enough capacity for a group to attend. This method must take a single integer parameter representing the size of the group, and return a boolean result. The method must work as follows: If the value of the parameter is less-than or equal-to 0 then the method must return false. This case has priority over those following. If the value of the parameter is less-than or equal-to the space left in the book club (use the capacity and occupancy values in the to work this out) then the method must return true. Otherwise (i.e., if there is not space in the book club for the whole group) then the method must return false. 2) This method must not change the state of the BookClub object. In other words, both the current number of occupants and the capacity of the club must be exactly the same after it is called as it was before (Note that the return type of this method…