Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Web development and programming

191828 questions • Page 240 / 3837

1. Suppose we have a Rectangle class that includes length and width attributes o
1. Suppose we have a Rectangle class that includes length and width attributes of type int, both set by the constructor. Create a compareTo method for this class so that rectangle…
1. Suppose we have a magnetic disk with the following parameters: • Average seek
1. Suppose we have a magnetic disk with the following parameters: • Average seek time = 4 ms • Rotation rate = 5400 RPM • Transfer rate = 50 MB/second • Sector size = 512 bytes • …
1. Suppose we have a web server that keeps a table of client IP addresses and th
1.      Suppose we have a web server that keeps a table of client IP addresses and the web pages they have accessed (like a cache). When a client requests a page from the server, …
1. Suppose we have a web server that keeps a table of client IP addresses and th
1.      Suppose we have a web server that keeps a table of client IP addresses and the web pages they have accessed (like a cache). When a client requests a page from the server, …
1. Suppose we have determined that this loop is where our algorithm does the mos
1. Suppose we have determined that this loop is where our algorithm does the most work: for(int i = 0; i < N; ++i) for(int j = 0; j < N; ++j) for(int k = 0; k < N ++k) a[…
1. Suppose we represent non-negative real numbers in fixed point notation fixed
1. Suppose we represent non-negative real numbers in fixed point notation fixed <16, 16> where 16-bits are allocated for the integer part of the number and 16-bits are alloc…
1. Suppose we represent non-negative real numbers in fixed point notation fixed
1. Suppose we represent non-negative real numbers in fixed point notation fixed<16, 16> where 16-bits are allocated for the integer part of the number and 16-bits are alloca…
1. Suppose we represent non-negative real numbers in fixed point notation fixed
1. Suppose we represent non-negative real numbers in fixed point notation fixed<16, 16> where 16-bits are allocated for the integer part of the number and 16-bits are alloca…
1. Suppose we represent non-negative real numbers in fixed point notation fixed
1. Suppose we represent non-negative real numbers in fixed point notation fixed<16, 16> where 16-bits are allocated for the integer part of the number and 16-bits are alloca…
1. Suppose we roll a fair k-sided die with the numbers 1 through k on the die’s
1. Suppose we roll a fair k-sided die with the numbers 1 through k on the die’s faces. If X is the number that appears, what is E[X]? 2. Let G = (V, E) be a connected graph that i…
1. Suppose we want a program to request an integer (n) repeatedly until it is in
1. Suppose we want a program to request an integer (n) repeatedly until it is in the range 0 to 100 inclusive.   Which of the following is the best input validation loop? HINT: se…
1. Suppose we want to add a flip() method to the Chance class. This method shoul
1. Suppose we want to add a flip() method to the Chance class. This method should return, at random, either a 0 or a 1, where 0 stands for tails and 1 stands for heads. In the box…
1. Suppose we want to extend the Echo class to a class called DoubleEcho, which
1. Suppose we want to extend the Echo class to a class called DoubleEcho, which echoes the text file to the console as Echo does, but does so in double-spaced format. Thus if the …
1. Suppose we want to solve the inequality . Let the solution to this inequality
1. Suppose we want to solve the inequality . Let the solution to this inequality be . By computer, we want to find the value of . We know will be larger than 2. So, we just check …
1. Suppose we were to call a procedure named ProcOne , passing it two value para
1. Suppose we were to call a procedure named ProcOne , passing it two value parameters. The procedure adds the two parameters and returns their sum in EAX: push 5 push 10 call Pro…
1. Suppose we were to call a procedure named ProcOne , passing it two value para
1. Suppose we were to call a procedure named ProcOne , passing it two value parameters. The procedure adds the two parameters and returns their sum in EAX: push 5 push 10 call Pro…
1. Suppose we were to call a procedure named Procone, passing it three value par
1. Suppose we were to call a procedure named Procone, passing it three value parameters. The procedure adds the two parameters and retums their sum in EAX Mow eax.7 mov eax, 11 pu…
1. Suppose x = 3 and y = 2; show the output, if any, of the following code. What
1. Suppose x = 3 and y = 2; show the output, if any, of the following code. What is the output if x = 3 and y = 4? What is the output of x = 2 and y = 2? if(x>2){    if(y>2)…
1. Suppose x = 3 and y = 2; show the output, if any, of the following code. What
1. Suppose x = 3 and y = 2; show the output, if any, of the following code. What is the output if x = 3 and y = 4? What is the output of x = 2 and y = 2? if(x>2){    if(y>2)…
1. Suppose you are a manufacturer of product ABC, which is composed of parts X,
1. Suppose you are a manufacturer of product ABC, which is composed of parts X, Y, and Z. Each time a new product is created, it must be added to the product inventory, using the …
1. Suppose you are asked to create a new method for the stack class, PopN, defin
1.    Suppose you are asked to create a new method for the stack class, PopN, defined as follows: PopN(S, n) { Removes from stack S the n number of items that were   most recently…
1. Suppose you are given the following keys: 115, 2545, 995, 505 and the followi
1. Suppose you are given the following keys: 115, 2545, 995, 505 and the following hash function h(x)- mod 10. Hash the keys using the hash function. How many keys collide? Choose…
1. Suppose you are given the following spreadsheet containing student names, the
1. Suppose you are given the following spreadsheet containing student names, their status, scores for an exam, and the number of absences. 1 Student Status 2Lorraine Rowe sunior C…
1. Suppose you are given the following spreadsheet containing student names, the
1. Suppose you are given the following spreadsheet containing student names, their status, scores for an exam, and the number of absences. of Atnences Calvin McsFreshman sephomore…
1. Suppose you are given the following variable declarations: int x, y; char ch;
1. Suppose you are given the following variable declarations: int x, y; char ch; What values (if any) are assigned to x, y, and ch after each of these statements execute? Assume t…
1. Suppose you are given the following variable declarations: int x, y; char ch;
1. Suppose you are given the following variable declarations: int x, y; char ch; What values (if any) are assigned to x, y, and ch after each of these statements execute? Assume t…
1. Suppose you are given the following variable declarations: int x, y; char ch;
1. Suppose you are given the following variable declarations: int x, y; char ch; What values (if any) are assigned to x, y, and ch after each of these statements execute? Assume t…
1. Suppose you are given the following variable declarations: int x, y; char ch;
1. Suppose you are given the following variable declarations: int x, y; char ch; What values (if any) are assigned to x, y, and ch after each of these statements execute? Assume t…
1. Suppose you are writing a driver class called PadDriver, whichwill make use o
1. Suppose you are writing a driver class called PadDriver, whichwill make use of the PaperPad class (see other side.) a) In this driver class create a PaperPad object with owner …
1. Suppose you check your e-mail and find a message from someone at Microsoft.co
1. Suppose you check your e-mail and find a message from someone at Microsoft.com.  The message body is as follows: As a user of Microsoft Internet Explorer, Microsoft Corporation…
1. Suppose you have 1000 records on disk. Each record is 2000 bytes, but the key
1. Suppose you have 1000 records on disk. Each record is 2000 bytes, but the key of each record is only 10 bytes. Explain how index sorting could be used to efficiently output the…
1. Suppose you have a 12-bit cell. Find a binary number such that when you add i
1. Suppose you have a 12-bit cell. Find a binary number such that when you add it to 0110 0101 0111, the sum is all 0's. That is, find the missing number in the following operatio…
1. Suppose you have a Java DB database on your system named inventoryDB. What da
1. Suppose you have a Java DB database on your system named inventoryDB. What database UKI would you use in a Java program to get a connection to the database? 2. What static JDBC…
1. Suppose you have a hard disk with 2200 tracks per surface, each track divided
1. Suppose you have a hard disk with 2200 tracks per surface, each track divided into 110 sec- tors, six platters and a blocksize of 512 bytes (G.e.. kilobyte), what is the total …
1. Suppose you have a hard drive with 20 blocks of storage. This particular driv
1. Suppose you have a hard drive with 20 blocks of storage. This particular drive uses contiguous allocation with a first-fit method of allocating files. Compute the hard drive la…
1. Suppose you have a satellite access link that provides 3Mbps downloads; the l
1.       Suppose you have a satellite access link that provides 3Mbps downloads; the link is 36000Km (geosynchronous), the average download packet is 5x 10^6 bytes, and the averag…
1. Suppose you have an array of n items (the \"member items\") and a separate li
1. Suppose you have an array of n items (the "member items") and a separate list of k items (the "test items"). The member items are not stored in any particular order. You want t…
1. Suppose you have an array of n items (the \"member items\") and a separate li
1. Suppose you have an array of n items (the "member items") and a separate list of k items (the "test items"). The member items are not stored in any particular order You want to…
1. Suppose you know that every employee in your organization has a seven-digit I
1. Suppose you know that every employee in your organization has a seven-digit ID number used for logging on to the computer system. A loop would be useful to guess every combinat…
1. Suppose you need to sort a relation of 40 gigabytes, with 4 kilobyte blocks,
1. Suppose you need to sort a relation of 40 gigabytes, with 4 kilobyte blocks, using a memory size of 40 megabytes. Suppose the cost of a seek is 5 milliseconds, while the disk t…
1. Suppose you need to write a method that calculates the volume of a 3D rectang
1. Suppose you need to write a method that calculates the volume of a 3D rectangular solid. Which of the following is the best choice for the declaration of this method? Select on…
1. Suppose you observe that your home PC is responding very slowly to informatio
1. Suppose you observe that your home PC is responding very slowly to information requests from the net. And then you further observe that your network gateway shows high levels o…
1. Suppose you shine the laser at a double slit and you observe an interference
1. Suppose you shine the laser at a double slit and you observe an interference pattern on the screen. What do you expect to happen to the interference pattern if you move the scr…
1. Suppose you want to create a new InsuredCar class that is derived from the Ca
1. Suppose you want to create a new InsuredCar class that is derived from the Car class. It adds one new booleanattribute, insured. Here is a constructor call for the class: Insur…
1. Suppose you want to implement an ADT in which you can insert values and retri
1. Suppose you want to implement an ADT in which you can insert values and retrieve or remove the item with smallest value. (This ADT is called a priority queue). If forced to cho…
1. Suppose you wanted quick lookup capability to get a listing of all plays dire
1. Suppose you wanted quick lookup capability to get a listing of all plays directed by a given director. Which table would be the basis for the INDEX table, and what would be the…
1. Suppose your friend is thinking of a number between 10 and 1,000,000. Suppose
1. Suppose your friend is thinking of a number between 10 and 1,000,000. Suppose that P "Your number is prime". Q = "Your number is even", and R = "Your number is evenly divisible…
1. Suppose your method does not return any value, which of the following keyword
1. Suppose your method does not return any value, which of the following keywords can be used as a return type? a. void b. int c. double d. public e. None of the above 2. The sign…
1. Suppose you’ve been sent back in time and have arrived at the scene of an anc
1. Suppose you’ve been sent back in time and have arrived at the scene of an ancient Roman battle. Moreover, suppose you have just learned that it is your job to assign n spears t…
1. Supposed that the user uses the ff SELECT statement: what will be the possibl
1. Supposed that the user uses the ff SELECT statement: what will be the possible output. SELECT GRADE AS STUDENT MARK FROM GRADE_REPORT; Select one: a. Error because of missing “…