Listing 16.4, ComboBoxDemo.java, gives a program that lets the user view a country?s flag image and description by selecting the country from a combo box. The description is a string coded in the...
Write a program that displays a flag rising up, as shown in Figure 15.14. As the national flag rises, play the national anthem. (You may use a flag image and anthem audio file from Listing 16.15.)...
Write a program that can dynamically change the font of a text in a label displayed on a stack pane. The text can be displayed in bold and italic at the same time. You can select the font name or...
Define the following methods in MyList and implement them in MyAbstractList: Write a test program that creates two MyArrayLists, list1 and list2, with the initial values {"Tom", "George", "Peter",...
Linda claims to have an algorithm that takes an input sequence S and produces an output sequence T that is a sorting of the n elements in S. a. Give an algorithm, isSorted, that tests in O(n) time if...
Modify Listing, TestWeightedGraph.java, to create a file for representing graph1. The file format is described in Exercise. Create the file from the array defined in lines 7?24 in Listing. The number...
Suppose we are given two sequences A and B of n elements, possibly containing duplicates, on which a total order relation is defined. Describe an efficient algorithm for determining if A and B...
Draw a simple, connected, undirected, weighted graph with 8 vertices and 16 edges, each with unique edge weights. Illustrate the execution of the Prim-Jarnik algorithm for computing the minimum...
Let G be an undirected graph with n vertices and m edges. Describe an O(n+m)-time algorithm for traversing each edge of G exactly once in each direction.
Create a sample XML document and DTD for the exchange of student transcript data. Use your college transcript as a sample.
Explain and contrast the differences and similarities between the DBA and DA.
Describe the activities that are typically associated with the design and implementation services of the DBA technical function. What technical skills are desirable in the DBA's personnel?
Using SQL statements, give some examples of how you would use the data dictionary to monitor the security of the database.
Rewrite Listing 30.6, ThreadCooperation.java, using the object?s wait() and notifyAll() methods. Listing 1 import java.util.concurrent.*; 2 import java.util.concurrent.locks.*; 3 4 public class...
Modify GraphView in Listing 28.6 to add a new data field tree with a set method. The edges in the tree are displayed in red. Write a program that displays the graph in Figure 28.1 and the DFS/BFS...
Many system architects base their IT system designs on an n-tier architecture, where n is a number with value 2 or greater. Explain the difference between a single-tier architecture and an n-tier...
The square of a directed graph G = (V, E) is the graph G 2 = (V, E 2 ) such that (u, ) E 2 if and only G contains a path with at most two edges between u and . Describe efficient algorithms for...
For a very sparse connected graph G = (V, E), we can further improve upon the O(E + V lg V) running time of Prim's algorithm with Fibonacci heaps by preprocessing G to decrease the number of vertices...
This problem explores the space requirements for van Emde Boas trees and suggests a way to modify the data structure to make its space requirement depend on the number n of elements actually stored...
One class of permutations of the integers in the set S n = {0, 1, 2, . . . , 2 n 1} is defined by matrix multiplication over GF (2). For each integer x in S n , we view its binary representation as...
In the?parallel-machine-scheduling problem, we are given?n?jobs,?J 1 , J 2 , . . . ,J n , where each job?J k has an associated nonnegative processing time of?p k . We are also given?m?identical...
Mapmakers try to use as few colors as possible when coloring countries on a map, as long as no two countries that share a border have the same color. We can model this problem with an undirected...
Can edge list E be omitted from the adjacency matrix representation while still achieving the time bounds given in Table 14.1? Why or why not? Edge List | Adj. List O(1) 0(1) O(n) O(m) O(m) O(m) Adj....
Repeat Exercise R-14.28 for Figure 14.11 illustrating the Floyd-Warshall algorithm. Repeat Exercise Describe the meaning of the graphical conventions used in Figure 14.9 illustrating a DFS traversal....
Our implementation of shortestPathLengths in Code Fragment 14.13 relies on use of ?infinity? as a numeric value, to represent the distance bound for vertices that are not (yet) known to be reachable...
As indicated in the chapter text, any wave can be represented as a sum of sine waves of various frequencies, amplitudes, and phases. This problem explores the effects of channel bandwidth, shape of...
The definition of an operating system specifies two primary purposes served by the operating system. What are they?
Describe the contents and format of a free space bitmap.
Design a survey form of your own. Fill it out as it might have been completed during the database design forHenry Books. For any questions you have too little information to answer, make a reasonable...
Develop a storyboard that encompasses the following sample dialog. The system supports rental and download of movies or television shows to a computer or digital video recording and playback device....
Use a TextArea, and its setText() and append() methods to write an application that allows the user to select options for a dormitory room. Use CheckBoxes for options such as private room, Internet...
In what common situation is the document returned by a Web server created after the request is received?
If the strName variable contains the string Sharon Kelper, which of the following changes the contents of the variable to the string Sharon P. Kelper? a. strName = strName.Insert(6, " P.") b. strName...
Which of the following statements assigns the first four characters in the strItem variable to the strWarehouse variable? a. strWarehouse = strItem.Assign(0, 4) b. strWarehouse = strItem.Assign(1, 4)...
If the strWord variable contains the string crispy, which of the following statements assigns the letter s to the strLetter variable? a. strLetter = strWord.Substring(3) b. strLetter =...
Which of the following statements changes the contents of the strZip variable from 60521 to 60461? a. strZip = strZip.Insert(2, "46") strZip = strZip.Remove(4, 2) b. strZip = strZip.Remove(2) strZip...
Which of the following statements changes the contents of the strSocSec variable from 000-11-2222 to 000112222? a. strSocSec = strSocSec.Remove("") b. strSocSec = strSocSec.RemoveAll("") c. strSocSec...
Which of the following statements generates a random integer from 1 to 25 (including 25)? a. intNum = randGen.Next(1, 25) b. intNum = randGen.Next(1, 26) c. intNum = randGen(1, 25) d. intNum =...
Which of the following statements enables the btnClear control? a. btnClear.Enabled() b. btnClear.Enabled = Yes c. btnClear.Enabled = True d. btnClear.Enable = True
The strNames array contains 100 elements. Which of the following statements assigns the number 99 to the intLastSub variable? a. intLastSub = strNames.Length b. intLastSub = strNames.GetUpperBound(0)...
Which of the following declares a two-dimensional array that has four rows and three columns? a. Dim decNums(2, 3) As Decimal b. Dim decNums(3, 4) As Decimal c. Dim decNums(3, 2) As Decimal d. Dim...
The intNums array is declared as follows: Dim intNums() As Integer = {10, 5, 7, 2}. Which of the following blocks of code correctly calculates the average value stored in the array? The intTotal...
What must be done to text before it can be animated?
Write an HTML document to create a form that collects favorite popular songs, including the name of the song, the composer, and the performing artist or group. This document must call one PHP script...
Which of the following assigns the number 0 to each element in a two-row, four-column Integer array named intSums? a. For intRow As Integer = 0 To 1 For intCol As Integer = 0 To 3 intSums(intRow,...
Which of the following returns the highest column subscript in a two-dimensional array named decPays? a. decPays.GetUpperBound(1) b. decPays.GetUpperBound(0) c. decPays.GetUpperSubscript(0) d....
Open the Professor Juarez Solution.sln file contained in the VB2017\Chap08\Professor Juarez Solution folder. a. Open the Code Editor window and locate the btnDisplay_Click procedure. The procedure...
Explain why the callback function is written as an anonymous function in the request phase function.
How are beans used by JSP applications?
Consider the calculation of roots of an equation z N = where N 1 is an integer and = e j a nonzero complex number. (a) First verify that there are exactly N roots for this equation and that they...
The geometric series
Build a 32-bit synchronous Up/Down counter. The inputs are Reset and Up. When Reset is 1, the outputs are all 0. Otherwise, when Up = 1, the circuit counts up, and when Up = 0, the circuit counts...
Consider a signal x(t) = 4cos(2t) defined for < t < . For the following values of the sampling period T s generate a discretetime signal x(n) = x(nT s ) = x(t) t=nTs . (i) T s = 0.1, (ii) T s =...
While walking down a dark alley, Ben Bit diddle encounters a two input gate with the transfer function shown in Figure 1.48. The inputs are A and B and the output is Y. A Figure 1.48 Two-Input DC...
Implement the following functions using a single 16 3 ROM. Use dot notation to indicate the ROM contents. (a) X = AB +BCD + AB (b) Y = AB +BD (c) Z = A +B+ C + D
2 Implement the functions from Exercise 5.51 using a 4 8 3 PLA. You may use dot notation.
Give three examples from the MIPS architecture of each of the architecture design principles: (1) simplicity favors regularity (2) make the common case fast (3) smaller is faster (4) good design...
Explain how the following program can be used to determine whether a computer is big-endian or little-endian:? li $t0, 0XABCD9876 Sw $t0, 100( $0) lb $s5, 101($0)
Write an HDL module for the soda machine dispenser from Exercise 3.26. Data from problem 3.26 You have been enlisted to design a soda machine dispenser for your department lounge. Sodas are partially...
In less than one page, describe four everyday activities that exhibit temporal or spatial locality. List two activities for each type of locality, and be specific.
Ben Bitdiddle is trying to compute the function f(a, b) = 2a + 3b for nonnegative b. He goes overboard in the use of function calls and recursion and produces the following high-level code for...
Repeat Exercise 8.9 for the following repeating sequence of lw addresses (given in hexadecimal) and cache configurations. The cache capacity is still 16 words. 74 A0 78 38C AC 84 88 8C 7C 34 38 13C...
Using a diagram similar to Figure 7.52, show the forwarding and stalls needed to execute the following instructions on the pipelined MIPS processor.? add $t0, $s0, $s1 sub $t0, $t0, $s2 $t1, 60( $t0)...
The Queen Anne Curiosity Shop sells both antiques and current-production household items that complement or are useful with the antiques. For example, the store sells antique dining room tables and...
Show that the summation ENog, i] is O(n log n)
Show that the summation . You may assume that n is a power of 2. E log2(n/i)] is O(n)
Write a SQL statement to display all columns of all rows of PET. Do not use the asterisk (*) notation. PET_OWNER ( OwnerID , OwnerLastName, OwnerFirstName, OwnerPhone, OwnerEmail) PET ( PetID ,...
Write a SQL statement to display the breed and type of all pets. PET_OWNER ( OwnerID , OwnerLastName, OwnerFirstName, OwnerPhone, OwnerEmail) PET ( PetID , PetName, PetType, PetBreed, PetDOB,?...
Write an SQL statement to display the OwnerLastName, OwnerFirstName, PetName, PetType, PetBreed, and AverageLifeExpectancy for pets with a known PetBreed. PET_OWNER ( OwnerID , OwnerLastName,...
Which of the following is not an E-R model relationship? a. Some-to-many b. One-to-one c. One-to-many d. Many-to-many
In Chapter 14, you created an interactive GUI version of Carlys Catering. Now, rewrite the program using JavaFX and Scene Builder. Allow the user to enter the number of guests for an event into a...
In Chapter 14, you created an interactive GUI version for Sammys Seashore Rentals. Now, rewrite the program using JavaFX and Scene Builder that allows the user to enter a rental time in hours into a...
Order the following list of functions by the big-Oh notation. Group together (for example, by underlining) those functions that are big-Theta of one another.
Why are functions in this chapter referred to as single-row functions?
Whats the name of the table provided by Oracle 11g for completing queries that dont involve a table? a. DUMDUM b. DUAL c. ORAC d. SYS
Create and execute SQL statements to perform the following actions, using the JustLee Books database: 1. Create a new user account. The account name should be a combination of your first initial and...
Describe the structure and pseudocode for an array-based implementation of an index-based list that achieves O(1) time for insertions and removals at index 0, as well as insertions and removals at...
Give an O(n)-time algorithm for computing the depth of all the nodes of a tree T, where n is the number of nodes of T.
Suppose you are given the array A = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], and you then perform the binary search algorithm given in this chapter to find the number 8. Which numbers in the array A...
Suppose you work for a computer game company, which is designing a first person shooting game. In this game, players stand just outside of a circular playing field and shoot at targets inside the...
How many walls were erased to construct the maze in Figure 7.3, not counting the start and finish walls? Figure 7.3
Perform a similar analysis for method Loop3 shown in Algorithm 1.21. Algorithm Loop1(n): s-0 for i + 1 to n do s-s+i Algorithm Loop2(n): p-1 for i - 1 to 2n do p-p.i Algorithm Loop3(n): p-1 for i +1...
Let A be a collection of objects. Describe an efficient method for converting A into a set. That is, remove all duplicates from A. What is the running time of this method?
Sports announcers are expected to keep talking during a broadcast of a sporting event even when there is nothing actually happening, such as during half-time. One common way to fill empty time is...
Another problem of interest in percolation theory is to determine the threshold probability where a liquid will permeate a porous material. One way to model this is to consider the barriers between...
Suppose we have 20 singleton sets, numbered 0 through 19, and we call the operation union(find(i),find(i + 5)), for i = 0, 1, 2,..., 14. Draw a picture of a tree-based representation of the sets that...
Provide an example instance of the fractional knapsack problem where a greedy strategy based on repeatedly choosing as much of the highest-benefit item as possible results in a suboptimal solution.
Suppose we are given a set of tasks specified by pairs of the start times and finish times as T = {(1, 2),(1, 3),(1, 4),(2, 5),(3, 7),(4, 9),(5, 6),(6, 8),(7, 9)}. Solve the task scheduling problem...
Suppose that the coins of the fictional country of Combinatoria come in the denominations, d 1 , d 2 ,...,d k , where d 1 = 1 and the other d i values form a set of distinct integers greater than 1....
Sally is hosting an Internet auction to sell n widgets. She receives m bids, each of the form I want k i widgets for d i dollars, for i = 1, 2,...,m. Characterize her optimization problem as a...
Tamarindo University and many other schools worldwide are doing a joint project on multimedia. A computer network is built to connect these schools using communication links that form a free tree....
Suppose the football coach for the Anteaters has heard about your abilities to solve challenging problems and has hired you to write a computer program that can decide which of their many trophies to...
Show that every language L in P is polynomial-time reducible to the language M = {5}, that is, the language that simply asks whether the binary encoding of the input is equal to 5.
Show how to construct a Boolean circuit C such that, if we create variables only for the inputs of C and then try to build a Boolean formula that is equivalent to C, then we will create a formula...
Consider the problem DNF-DISSAT, which takes a Boolean formula S in disjunctive normal form (DNF) as input and asks whether S is dissatisfiable, that is, there is an assignment of Boolean values to...
Draw an example of a graph with 10 vertices and 15 edges that has a clique of size 6.
Given a set P of n points, design an efficient algorithm for constructing a simple polygon whose vertices are the points of P.
Show how to modify the KMP string pattern matching algorithm so as to find every occurrence of a pattern string P that appears as a substring in T, while still running in O(n + m) time. (Be sure to...
Using only the instructions shown in Figure 1-10, create an algorithm that displays the average of four numbers. Be sure to indent the instructions appropriately. calculate the average by dividing...