Consider the following function in answering the questions below. int a, int b, int c; int temp; if (a > b) temp = a; else temp = b; if (c > temp) temp = c; return temp; } a) Develop test input that will provide 100% statement coverage.
Q: Data democratization is the process of revealing a company’s data that previously was considered a t...
A: Data democratization is the process of enabling everybody in an organization, irrespective of their ...
Q: What is the most significant part of the move from a serial to a batch processing system?
A: Introduction: The most significant feature of the move from serial to batch processing systems.
Q: Is this true or false? - A virtual member function executes more quickly than a standard member func...
A: Introduction: A virtual function is a member function declared in the base class and overridden by t...
Q: Task5: Add a function to your copy of cla14a.cc, say StudentAvg(), which finds and prints the lab av...
A: Algorithm: Start Initialize numStudents to 3 and numLabs to 3 Initialize labScores 2d array with da...
Q: How are centralized and parallel/distributed databases different?
A: Introduction: Centralized database: A centralized database (also known as a CDB) is one that is loca...
Q: Explain the relationship between information gathering and intelligence, including the process where...
A: Here is the answer with an explanation:-
Q: Write a program to print following data
A: All the programs are written in Python: Program 1: Print the requirement print(''' -----------...
Q: Display Fibonacci series up to 10 terms in python user input
A: A Fibonacci series consists of integer sequence of 0, 1, 1, 2, 3, 5,... The first two terms are 0 an...
Q: enrolled in the Algorithms, Part II course on Coursera, and considering that the question is given a...
A: Here we have given the algorithm for radix sort and given explanation for O(n) time complexity
Q: Analyze the way hardware registers are implemented in terms of logic gates
A: Here we have given the solution for the way hardware registers are implemented in terms of logic gat...
Q: Select ONE (1) research area in artificial intelligence that contribute to special needs people or s...
A: Here we have given the contents of the presentation by mentioning the slide number and its contents....
Q: or Y1 CLK and and YiT 15
A: Step 2 Now find the equations for the input of flip flops and the output. T=XY2+X⊕Y1J=X'+Y1K=XY1Z1=X...
Q: Write a Python program to list all the files which is present under "/" directory.
A: Python Code: ''' Python program that lists the files present in the current working directory and ...
Q: what is the difference between cache and register
A: Here in this question we have asked the difference between cache and register .
Q: better
A: Soluton An admissible heuristics are used to estimate the cost of reaching the goal state in a sea...
Q: What type of IPv6 address do you need to get on the Internet? a. Global unicast address b. Anycast ...
A: To get on the internet, you need an address. That address should be unique and be your's only. This ...
Q: Write a C++ program to calculate a rectangle's area. The program consists of the following function:...
A: It ask user to enter length and width Then it return the area of rectangle along with length and wi...
Q: Explain how the internet works, including all equipment involved in the internet connection.
A: WORKING ON THE INTERNET: The internet is described as a computer network that transfers various typ...
Q: Describe how the deep web benefits firms that employ information systems.
A: Introduction: Management information systems (MIS) are organisational tools that aid in procedures, ...
Q: Pipeline stall should be defined.
A: introduction: The pipeline stall is a kind of fault that occurs in RISC or RISC-influenced processor...
Q: Briefly discuss your experience with at least two types/classes of computers
A: The solution to the give problem is below.
Q: Determine different size of cpu registers in modern computers
A: Here in this question we have asked that what are some different size of cpu registers in modern com...
Q: Run this program and show the output. Thank you
A: What is Java Swing? Java Swing tutorial is a part of Java Foundation Classes (JFC) that is used to c...
Q: Needing help with networking question: Which of the following commands can you use to diagnose DNS p...
A: DNS stands for domain name system which is conversion of numeric ip address into string address.
Q: Library Management Software Application Requirements Document
A: -LSASR is a document that describes a software application that will be used within a library to man...
Q: RAID is predisposed to take into account ordinary rotating magnetic discs as a starting point. Is it...
A: Introduction: This question clarifies how RAID is biased to start with regular spinning magnetic dis...
Q: What kind of worries and challenges arise from the use of an unintegrated information system?
A: kind of worries and challenges arise from the use of an unintegrated information system -:- Computer...
Q: What is Onion network?
A: 1) Onion Networks also called as "tor" uses a technique called as onion routing for anonymous commun...
Q: A definition of pseudoinstruction would be helpful.
A: INTRODUCTION: PSEUDO INSTRUCTION: The pseudo instruction is the instruction the assembler converts t...
Q: programme counter
A: In step 2, I have provided answer.
Q: How are centralized and parallel/distributed databases different?
A: Difference between centralized database and distributed database: 1. In centralized database the dat...
Q: Write a C++ program to print the text "C++ Programming." in the output along with the quotes. Expect...
A: #include <iostream> using namespace std; int main(){ cout<<"\"C++ Programming.\""; ...
Q: Provide code to create a text area box for the memoMsg field. Add the placeholder text, “Enter your ...
A: Following is the syntax− <textarea placeholder="text"> <!DOCTYPE html> <html> &l...
Q: Analyze the way CPU registers are implemented in terms of logic gates
A: Introduction: They are the logic gates of digital electronics. Logic gates are often employed when c...
Q: Main.java x 1 import java.util.*; 2 , public class Main 3 Av public static void main(String [] args)...
A: getHeight(), getLargestKey() and getAverage() methods are returning data. So we need to store the re...
Q: compared to relational databases, hierarchical databases have several advantages. Positive or negati...
A: What Are the Advantages & Disadvantages of Hierarchical Structure? Advantage – Clear Chain of Co...
Q: Explain linear search method with an algorithm.
A:
Q: The several methods of file access are listed here. I'm wondering about the benefits and drawbacks o...
A: Introduction: The most basic file access method is: File organization is nothing more than gathering...
Q: please I want the solution on the Nmap program and taken screen shot for working dont answer if you ...
A: 1. If you want to scan one IP address, use the following command. nmap 192.168.2.20 by default, this...
Q: Define the term "floating point."
A: Definition: Floating-point numbers are fractional-part numbers that are often stated with a decimal ...
Q: Lab Goal : The lab was designed to teach you how to use arrays to simplify solving more complex prob...
A: Here is the answer:-
Q: tell them your idea before they get out of the
A:
Q: If a file register, x, is set to Ox01, what is the result of the instruction comf x, W? O A W= 0XFE ...
A: Below is the correct answer of above question. I hope this will be helpful for you..
Q: source programs and the screenshots of your MARS execution windows. 2. Create the data declaration ...
A: 1) program : .dataName: .asciiz "James"Age: .byte 24Numbers: .word 11, 33, 20Letter1: .asciiz "M" ...
Q: Give a DFA accepting all strings over (0,1} consisting of an odd number of repetitions of the string...
A: According to the question we need to answer: Give a DFA accepting all strings over (0,1} consistin...
Q: A tool that displays all of the data in the Results window is a. Configuration b. Tool c. Browse ...
A: We know that Results window is located below the canvas in Designer. For viewing data from a tool in...
Q: hi i need help getting started with this Python code: Write a program that prints the U.S. presiden...
A: Start input current year run while loop until year <= current_year print year increment year by...
Q: Write MATLAB code to enter employ ID, name, age,, and address).2. Show the class of each input data....
A: Program : Variables used x: store employee id str:store employee name x2 :store employee age str2 ...
Q: Direct mapped cache
A: What is Direct Mapping Process ? Direct mapping is a procedure used to assign each memory block in t...
Q: 1. Give an analysis of the running time (Big-Oh notation) for each of the following 4 program fragme...
A:
Step by step
Solved in 3 steps with 1 images
- : Given a boolean expression consisting of the symbols 0 (false), 1 (true), & (AND), I (OR), and / (XOR), and a desired boolean result value result, create a function that counts the number of ways the expression may be parenthesized such that it evaluates to result. The expression should be completely parenthesized (for example, (0) A(1)) but not excessively (for example, (((0)) / (1))).EXAMPLE \scountEval("l/01011", false) yields 2 counts."0&0&0&1All0", true) = 10Consider the function definition below. Assume x = 5, y = 3 and j = 8 as the function starts. Which variables will change after the function finishes? void findout (int &x, int y, int &j) { for (int i = 1; i 5) { x = 2*x - 3*y; y = 4 + 3 x; } else { Oi y = 2*x - 3; x = 4 + 3% y; } } // end of for loop x and y y All three since the first and last are references. x and jC language for solution Note: soution this program without use Struct 1. Write a program to do the following: a. Write a Cover Page function to print the HW details passing the needed parameters and has no return. b. Write a function that gets student grades and ID (maximum number of students is 20) then the function has a switch statement to enable the user to choose one of the following operation: i. Call MaxMin function to find and print the maximum and minimum grades as well as their ID ii. Call function Average to return the average grade of the class. iii. Call mark function to print students ID, their grades, and marks (as in the below table) iv. Call Sort function to sort the student ascending or descending based on their grades. The program will repeat the operation tile the user wish to terminate the program. Note: Student's grades are between 0 and 100 (use data validation technique). • You will get zero if you don't use comments and print HW details (your name, course name,…
- : Find the weakest precondition for the following code. Show all intermediate conditions. Simplify your answer Question 4. as much as possible. { } // This is the weakest precondition. Please fill in. x++; { } // This is an intermediate condition. Please fill in. if (z != 5) { { } // This is an intermediate condition. Please fill in. z = x + 1; { } // This is an intermediate condition. Please fill in. y { } %3D z; } // This is an intermediate condition. Please fill in. { } // This is an intermediate condition. Please fill in. Z = y z; { z != 0 } // This is the postcondition.} 2. Find errors, if any in the following function prototype. (4 each error) a. float average(x,y); b. int mul(int a,b); c. int display(...); d. void Vect(int &V, int & size); Prepared by: die Verified by: Dr.Abdul Khader JilaniPROGRAMMING PROBLEMS For the following programming problems, you need to time a section of code in C++. For example, the following statements time the execution of the function doSomething: #include clock_t start = clock(); doSomething (); clock_t finish = clock(); double overallTime = static_cast (finish - start) / CLOCKS_PER_SEC;3 1. Consider the following two loops: // Loop A for (i = 1; i = n; i++) for (j = 1; j e 10000; j++) sum = sum + j; // Loop B for (i = 1; i <= n; i++) for (j = 1; j <= n; j++) sum = sum + j; What is the Big O ofeach loop? Design and implement an experiment to find a value of n for which Loop B is faster than Loop A. 2. Repeat the previous project, but use the following for Loop B: // Loop B for (i = 1; i <= n; i++) for (j = 1; j <= n; j++) for (k = 1; k <= j; k++) sum = sum + k; 3 CLOCKS_PER_SECOND is a C++ predefined constant.
- PROGRAMMING PROBLEMS For the following programming problems, you need to time a section of code in C++. For example, the following statements time the execution of the function doSomething: #include clock_t start = clock(); doSomething(); clock_t finish = clock(); double overallTime = static_cast (finish start) / CLOCKS_PER_SEC; ³ 1. Consider the following two loops: // Loop A for (i = 1; i <= n; i++) for (j = 1; j <= 10000; j++) sum = sum + j; // Loop B for (i = 1; i <= n; i++) for (j = 1; j<= n; j++) sum = sum + j; What is the Big O of each loop? Design and implement an experiment to find a value of n for which Loop B is faster than Loop A. 2. Repeat the previous project, but use the following for Loop B: // Loop B for (i = 1; i <= n; i++) for (j = 1; jPROBLEM: Write a program that computes for the Electric Field and Electric Potential at a given point in a spherical conductor with a radius (r) and a charge Q, depending upon the following cases: Calculate the electric field and electric potential at: A. dr C. d = r SPECIFICATIONS: - The program will depend on the input parameters to determine which case to use in computing for the electric field and electric potential at different points: • Point is inside the conductor (d r) • Point is on the surface of the conductor (d = r) - The user will input the charge Q, the radius of the conductor (r) and the distance of the point from the center (d) - The constant k = 9x10^9 = 9000000000 - The program will provide an output for the electric field (V/m) and for the electric potential (V) - You may only use the codes that we studied in our lectures. - All lines of codes should have a comment/pseudocode. - Save your cpp file as Surname - PE (Example: Pangaliman - PE.cpp)2. Given the following function A(a, b), what does A(8, 3) return? 1 function A(a, b) if b = 0 return 1 else return A(a, b - 1) x a end if 7 end function4. You are given the following functions: int functionA(int a) { printf ("a-sd\n", a); if (a==1) return 1; else return functionB (a-1) *2; int functionB (int b) { printf ("b=3d\n",b); if (b--1) return 1; else return functionA (b-1) *3; Write the main function. Your main function should prompt the user for input and then call the mutual recursion by passing in the user's input. The guidelines are described below. int main () { //declare int a to receive user input and int result to receive result of mutual recursion //using a while loop, prompt user for input. The number entered //must be bigger than 1, otherwise repeat user input with an error //message. //call functionA () with int a as input argument. Receive the result in int result. //print result return 0;This is c programming question. Use function please for solving. Question: (The function that returns letter grade according to midterm and final grade) : The function turn_to_letter decides on the letter grade of the student according to the table below from the visa and final grades sent into it and returns it, write it together with a main function which the turn_to_letter function is called and prints the letter equivalent on the screen. - Success score = 40% of midterm + 60% of final, - F for the success score below 50, D for between 50 and 59, C for between 60 and 69, B for between 70 and 79, A for 80 and above.INSTRUCTIONS: Write a C++ script/code to do the given problems.MOVIE PROBLEM: Write a function that checks whether a person can watch an R18+ rated movie. One of the following two conditions is required for admittance:• The person is atleast 18 years old.• They have parental supervision.The function accepts two parameters, age and isSupervised. Return a boolean. Let the age and if supervised (yes or no) be user-input.Example:acceptIntoMovie(14, true) ➞ trueacceptIntoMovie(14, false) ➞ falseSEE MORE QUESTIONS