Question Answers
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Hire a Tutor
AI Tutor
AI Flashcards
FREE
Search
Search
Sign In
Register
study help categories
/
Computer science
Top Selling Computer science Questions
What does the funnel symbol that appears next to a fields name in the Query Builder dialog box indicate? a. The field is used in a SELECT statements ORDER BY clause. b. The field is used in a SELECT...
In this exercise, you modify the Games application from Exercise 5. Use Windows to make a copy of the Games Solution folder. Rename the copy Games Solution-Total. The frmMain_Load procedure should...
The Employees table contains six fields. The EmpNum, Rate, and DeptCode fields are numeric. The LastName, FirstName, and Status fields contain text. The Status field contains either the letter F (for...
Explain Apples view of user interface design, especially for apps.
How has input technology changed in recent years? Provide examples of traditional, evolving, and emerging input technology.
What do Venn diagrams display, and why is the information valuable?
Write a short Python function, is even(k), that takes an integer value and returns True if k is even, and False otherwise. However, your function cannot use the multiplication, modulo, or division...
Write a short Python function, minmax(data), that takes a sequence of one or more numbers, and returns the smallest and largest numbers, in the form of a tuple of length two. Do not use the built-in...
Give a single command that computes the sum from Exercise R-1.4, relying on Pythons comprehension syntax and the built-in sum function. Exercise R-1.4 Write a short Python function that takes a...
Show that (n+1) 5 is O(n 5 ).
Control systems attempt to follow the reference signal at the input, but in many cases they cannot follow particular types of inputs. Let the system we are trying to control have a transfer function...
The syntax data.remove(value) for Python list data removes only the first occurrence of element value from the list. Give an implementation of a function, with signature remove all(data, value), that...
The signal at the input of an AM receiver is u(t) = m 1 (t) cos(20t) + m 2 (t) cos(100t) where the messages m i (t), i = 1; 2 are the outputs of a lowpass Butterworth filter with inputs x 1 (t) =...
Write a program that displays Welcome to Java, Welcome to Computer Science, and Programming is fun.
The constructor for the CaesarCipher class in Code Fragment 5.11 can be implemented with a two-line body by building the forward and backward strings using a combination of the join method and an...
Listing 2.7, ShowCurrentTime.java, gives a program that displays the current time in GMT. Revise the program so that it prompts the user to enter the time zone offset to GMT and displays the time in...
Rewrite Listing 2.10, ComputeChange .java, to fix the possible loss of accuracy when converting a double value to an int value. Enter the input as an integer whose last two digits represent the...
Write a program that receives a character and displays its Unicode. Here is a sample run: Enter a character: E -Enter The Unicode for the character E is 69
A palindromic prime is a prime number and also palindromic. For example, 131 is a prime and also a palindromic prime, as are 313 and 757. Write a program that displays the first 100 palindromic prime...
Programming Exercise 3.21 uses Zeller?s congruence to calculate the day of the week. Simplify Listing 6.12, PrintCalendar.java, using Zeller?s algorithm to get the start day of the month. Listing...
Programming Exercise 8.12 writes a program for computing taxes using arrays. Design a class named Tax to contain the following instance data fields: For each filling status, there are six tax rates...
Write a program that creates a Date object, sets its elapsed time to 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000, and 100000000000, and displays the date and time using the...
Listing 3.5 gives a program to compute tax. Write a method for computing tax using the following header:public static double?computeTax(int?status,?double?taxableIncome)Use this method to write a...
Banks lend money to each other. In tough economic times, if a bank goes bankrupt, it may not be able to pay back the loan. A bank?s total assets are its current balance plus its loans to other banks....
Programming Exercise 6.39 gives a method for testing whether three points are on the same line.Write the following method to test whether all the points in the array points are on the same...
Listing 8.4 checks whether a solution is valid by checking whether every number is valid in the board. Rewrite the program by checking whether every row, every column, and every small box has the...
Design a class named Fan to represent a fan. The class contains: Three constants named SLOW, MEDIUM, and FAST with the values 1, 2, and 3 to denote the fan speed. A private int data field named...
Add the following new methods in?BST. /** Displays the nodes in a breadth-first traversal */ public void breadthFirstTraversal() /** Returns the height of this binary tree */ public int height()
Write a program that displays the first 50 prime numbers in descending order. Use a stack to store the prime numbers.
Write a program that simulates four cars racing, as shown in Figure 16.47b. You can set the speed for each car, with maximum 100. 2 Car 3: 10 Car 4: Car 1: Car 2: 5 (b)
Give a real-world example that requires sorting or a real-world example that requires computing a convex hull.
Show how to transform the weight function of a weighted matroid problem, where the desired optimal solution is a minimum-weight maximal independent subset, to make it a standard weighted-matroid...
Rewrite Exercise 17.12 with a GUI, as shown in Figure 17.21b. Write a utility program that combines the files together into a new file using the following command: java Exercise17_12 SourceFile1 . ....
Describe a recursive algorithm that will check if an array A of integers contains an integer A[i] that is the sum of two integers that appear earlier in A, that is, such that A[i] = A[ j]+A[k] for...
Implement a recursive method with calling signature find(path, filename) that reports all entries of the file system rooted at the given path having the given file name.
Revise the program in Listing 21.7. If a keyword is in a comment or in a string, don?t count it. Pass the Java file name from the command line. Assume that the Java source code is correct and line...
Suppose each position p of a binary tree T is labeled with its value f (p) in a level numbering of T. Design a fast method for determining f (a) for the lowest common ancestor (LCA), a, of two...
Write a program that lets the users create a weighted graph dynamically. The user can create a vertex by entering its name and location, as shown in Figure 29.27. The user can also create an edge to...
Modify Listing 28.1, TestGraph.java, to create a file representing graph1. The file format is described in Programming Exercise 28.1. Create the file from the array defined in lines 8?21 in Listing...
Modify Listing 28.10, ConnectedCircles.java, to enable the user to drag and move a circle. Listing 1 import javafx.application. Application; 2 import javafx.geometry.Point2D; 3 import...
Rewrite Exercise 20.13 using JSF, as shown in Figure 33.34. Upon clicking the Refresh button, the program displays four random cards and displays an expression if a 24-point solution exists....
Rewrite Exercise 20.17 using JSF, as shown in Figure 33.35. The program lets the user enter four card values and finds a solution upon clicking the Find a Solution button. This exercise is a...
This problem examines three algorithms for searching for a value x in an unsorted array A consisting of n elements. Consider the following randomized strategy: pick a random index i into A. If A[i] =...
Chapter 30 examines an important algorithm called the fast Fourier transform, or FFT. The first step of the FFT algorithm performs a bit-reversal permutation on an input array A[0 . . n - 1] whose...
Consider implementing a stack in a computer that has a relatively small amount of fast primary memory and a relatively large amount of slower disk storage. The operations PUSH and POP work on...
A practical method for interpolating a set of points with a curve is to use cubic splines. We are given a set {(x i , y i ) : i = 0, 1, . . . , n} of n + 1 point-value pairs, where x 0 1 n. We wish...
The IEEE provides a standard 32-bit format for floating point numbers. The format for a number is specified as 1.M 2 E 127 . Explain each part of this format.
To implement the preorder method of the AbstractTree class, we relied on the convenience of creating a snapshot. Reimplement a preorder method that creates a lazy iterator. (See Section 7.4.2 for...
What is routing? Explain the difference between circuit switching and virtual circuit switching. What is a third, more common, alternative? How does it differ from the other two?
Draw a pair of sine waves that are 45 out of phase.
Describe a fully qualified domain name.
Create and test an HTML document that has six short paragraphs of text that describe various aspects of the state in which you live. You must define three different paragraph styles, p1, p2, and p3....
Mats-R-Us sells three different types of mats: Standard ($99), Deluxe ($129), and Premium ($179). All of the mats are available in blue, red ($10 extra), and pink ($15 extra). There is also an extra...
Which of the following assigns the number of characters in the strAddress variable to the intNum variable? a. intNum = strAddress.Length b. intNum = strAddress.LengthOf c. intNum = Length(strAddress)...
In this exercise, you modify the Password application from this chapters Apply lesson. Use Windows to make a copy of the Password Solution folder. Rename the copy Password Solution-Index. Open the...
The intNum array is declared as follows: Dim intNum(,) As Integer = {{6, 12, 9, 5, 2}, {35, 60, 17, 8, 10}}. The intNum(1, 4) = intNum(1, 2) - 5 statement will_____________________. a. Replace the 10...
Develop and test an HTML document that collects the following information from the user: last name, first name, middle initial, age (restricted to be greater than 17), and weight (restricted to the...
What new software must be installed on a browser or server to run Web applications that use Ajax?
Write, test, and debug (if necessary) a Ruby program with the following specification: Input: A list of numbers from the keyboard. Output: The median of the input numbers.
The Fourier transforms of even and odd functions are very important. Let x(t) = e ? ?t ? and y(t) = e ?t u(t) ? e t u(?t). (a) Plot x(t) and y(t), and determine whether they are even or odd. (b) Show...
For signals with infinite support, their Fourier transforms cannot be derived from the Laplace transform unless they are absolutely integrable or the region of convergence of the Laplace transform...
Explain how you would change the stored procedure in Figure 10A-58 to connect the customer to all artists who either (a) Were born before 1900 or (b) Had a null value for Birthdate.
Write an HDL module for the FSM with the state transition diagram given in Figure 3.70 from Exercise 3.23.
Another definition for the finite difference is the backward difference: 1 [x(nT s )] = x(nT s ) x((n 1)T s ) ( 1 [x(nT s )]/T s approximates the derivative of x(t)). (a) Indicate how this new...
Write an HDL module for the latch from Figure 3.18. Use one assignment statement for each gate. Specify delays of 1 unit or 1 ns to each gate. Simulate the latch and show that it operates correctly....
What is the range of instruction addresses to which conditional branches, such as beq and bne, can branch in MIPS? Give your answer in number of instructions relative to the conditional branch...
Explain how to extend the pipelined processor to handle the j instruction. Give particular attention to how the pipeline is flushed when a jump takes place.
The following questions examine the limitations of the jump instruction, j. Give your answer in number of instructions relative to the jump instruction. (a) In the worst case, how far can the jump...
Is the miss rate of a two-way set associative cache always, usually, occasionally, or never better than that of a direct mapped cache of the same capacity and block size? Explain.
A cache has the following parameters: b, block size given in numbers of words; S, number of sets; N, number of ways; and A, number of address bits. (a) In terms of the parameters described, what is...
You decide to speed up the virtual memory system of Exercise 8.21 by using a translation lookaside buffer (TLB) with 128 entries. (a) How big (in bits) is the TLB? Give numbers for data (physical...
Suppose the MIPS multicycle processor described in Section 7.4 uses a virtual memory system. (a) Sketch the location of the TLB in the multicycle processor schematic. (b) Describe how adding a TLB...
Describe a scenario in which the virtual memory system might affect how an application is written. Be sure to include a discussion of how the page size and physical memory size affect the performance...
Suppose you own a personal computer (PC) that uses 32-bit virtual addresses. (a) What is the maximum amount of virtual memory space each program can use? (b) How does the size of your PCs hard drive...
Graph the functions 12n, 6n log n, n 2 , n 3 , and 2n using a logarithmic scale for the x- and y-axes; that is, if the function value f(n) is y, plot this as a point with x-coordinate at log n and...
Consider a virtual memory system that can address a total of 250 bytes. You have unlimited hard drive space, but are limited to 2 GB of semiconductor (physical) memory. Assume that virtual and...
The virtual memory system you are designing uses a single-level page table built from dedicated hardware (SRAM and associated logic). It supports 25-bit virtual addresses, 22-bit physical addresses,...
Create a referential integrity constraint on OwnerID in PET. Assume that deletions should cascade PET_OWNER (OwnerID, OwnerLastName, OwnerFirstName, OwnerPhone, OwnerEmail) PET (PetID, PetName,...
Describe, using pseudocode, an implementation of the method insertBefore(p, e), for a linked list, assuming the list is implemented using a doubly linked list.
Describe, in pseudocode, a link-hopping method for finding the middle node of a doubly linked list with header and trailer sentinels, and an odd number of real nodes between them. What is the running...
Define the internal path length, I(T), of a tree T to be the sum of the depths of all the internal nodes in T. Likewise, define the external path length, E(T), of a tree T to be the sum of the depths...
Describe how to perform the operation findAllElements(k), which returns all the items with keys equal to k in a balanced search tree, and show that it runs in time O(log n + s), where n is the number...
Suppose you would like to build a hash table for images, where the key for each image is a thumbnail image of 7575 pixels, with each pixel being one of 256 possible colors. Describe a hash function...
What is the maxima set from the following set of points: {(7, 2),(3, 1),(9, 3),(4, 5),(1, 4),(6, 9),(2, 6),(5, 7),(8, 6)}?
Give an example of a set of n points in the plane such that every point is a maximum point, that is, no point in this set is dominated by any other point in this set.
An American spy is deep undercover in the hostile country of Phonemia. In order not to waste scarce resources, any time he wants to send a message back home, he removes all the punctuation from his...
Suppose G is a weighted, connected, undirected, simple graph and e is a largestweight edge in G. Prove or disprove the claim that there is no minimum spanning tree of G that contains e.
Show that the problem SAT, which takes an arbitrary Boolean formula S as input and asks whether S is satisfiable, is NP-complete.
Suppose you are given a connected weighted undirected graph, G, with n vertices and m edges, such that the weight of each edge in G is an integer in the interval [1, c], for a fixed constant c > 0....
Which of the following is not a programming control structure? a. Repetition b. Selection c. Sequence d. Sorting
Which of the following is the first step in the problem-solving process? a. Plan the algorithm b. Analyze the problem c. Desk-check the algorithm d. Code the algorithm into a program
Norbert Catering is famous for its roast beef sandwiches. The stores owner wants a program that he can use to estimate the number of pounds of roast beef a customer should purchase, given the desired...
Write a C++ for clause that processes the loop instructions 10 times. Use numTimes as the counter variables name.
A program declares an int variable named evenNum and initializes it to 2. Write the C++ code to display the even integers 2, 4, 6, 8, and 10 on separate lines on the computer screen. Use the do while...
Archie wants a program that calculates and displays a teams final score in a football game, given the numbers of the teams field goals, touchdowns, one-point conversions, two-point conversions, and...
Rewrite the code from Pencil and Paper Exercise 5 using the do while statement.
Correct the errors in the lines of code shown in Figure 4-34. (The code contains eight errors.)
Your downloadable files for Chapter 1 include a file named DEBUG01-04.jpg that contains a flowchart that contains syntax and/or logical errors. Examine the flowchart and then find and correct all the...
Modify the solution shown earlier in Figure 7-2. The solution should now keep track of the number of times Sahirahs laser beam missed the spider. After saying You are safe now. The spider is dead.,...
Which of the following is not a typical housekeeping task? a. Displaying instructions b. Printing summaries c. Opening files d. Displaying report headings
Showing 3200 - 3300
of 5000
First
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Last