Write an LL(1) grammar with action routines and automatic attribute space management that generates the reverse Polish translation described in Exercise 4.7. Data From Exercise 4.7: Suppose that we...
In Example 11.59 we showed how to implement interactive I/O in terms of the lazy evaluation of streams. Unfortunately, our code would not work as written, because Scheme uses applicative-order...
Modify the method that calculates the sum of the integers between 1 and N shown in this chapter. Have the new version match the following recursive definition: The sum of 1 to N is the sum of 1 to...
Write a switch statement to convert a letter grade into an equivalent numeric value on a fourpoint scale. Set the value of the variable gradeValue to 4.0 for an A, 3.0 for a B, 2.0 for a C, 1.0 for a...
Write a program that simulates a bouncing ball by computing its height in feet at each second as time passes on a simulated clock. At time zero, the ball begins at height zero and has an initial...
We fixed justvowels so that it works with lowercase or uppercase vowels. Fix notvowels so that it doesnt print out uppercase vowels. (Try it as it is in the chapter, and you will see that it does...
Write a function to convert Celsius to Fahrenheit.
Write a general scaleUp function that takes in any picture and creates and returns a new picture twice as big using makeEmptyPicture(width,height).
Write a method called repl that accepts a String and a number of repetitions as parameters and returns the String concatenated that many times. For example, the call repl( "hello", 3) should return...
The next five questions refer to the following String elements: ["It", "was", "a", "stormy", "night"] Write the code to declare an ArrayList containing these elements. What is the size of the list?...
Write a recursive method called dedup that takes a string as a parameter and that returns a new string obtained by replacing every sequence of repeated adjacent letters with just one of that letter....
Write a denotational semantics mapping function for the following statements: a. Ada for b. Java do-while c. Java Boolean expressions d. Java for
What problem do we encounter when we try to construct an array of type E? How do we resolve this problem?
Define exception, exception handler, raising an exception, continuation, finalization, and built-in exception.
Consider the following program written in C syntax: For each of the following parameter- passing methods, what are all of the values of the variables value and list after each of the three calls to...
The starting value of an algorithm used to generate a range of random numbers is called the _________.
In a binary search of an array named MyArray, the first time the program runs, the value of Low will be ____________.
Which function temporarily converts a string to a number and then returns the number? a. Format b. FormatNumber c. String d. Val
In this exercise, you modify the application from Exercise 5. Use Windows to make a copy of the Guessing Game Solution folder. Rename the copy Modified Guessing Game Solution. Open the Guessing Game...
What does the following program print? public class Mystery { public static void main(String[] args) { int x = 1; int total = 0; while (x
In Listing 19.1, GenericStack is implemented using composition. Define a new stack class that extends ArrayList. Draw the UML diagram for the classes then implement GenericStack. Write a test program...
Write a program that prompts the user to enter a text file name and displays the number of vowels and consonants in the file. Use a set to store the vowels A, E, I, O, and U.
Write a program that displays a tic-tac-toe board, as shown in Figure 31.48b. A cell may be X, O, or empty. What to display at each cell is randomly decided. The X and O are images in the files x.gif...
Write a program that reads a graph from a file and determines whether the graph is connected. The first line in the file contains a number that indicates the number of vertices (n). The vertices are...
Printing a grid. Write a program that prints the following grid to play tic-tac-toe. Of course, you could simply write seven statements of the form System.out.println("+--+--+--+"); You should do it...
There are several differences between the coding standards listed in this chapter. Give an explanation for these differences.
Design a Customer class to handle a customer loyalty marketing campaign. After accumulating $100 in purchases, the customer receives a $10 discount on the next purchase. Provide methods void...
Draw a use case diagram for the following situation (state any assumptions you believe you have to make in order to develop a complete diagram). Then convert the use case diagram into a sequence...
Discuss why some systems developers believe that a data model is one of the most important parts of the statement of information system requirements.
A SPARC implementation has K register windows. What is the number N of physical registers?
Discuss how each of the following features is realized in SQL 2008: object identifier, type inheritance, encapsulation of operations, and complex object structures.
Consider the library relational database schema in Figure 6.6. Write a program segment that retrieves the list of books that became overdue yesterday and that prints the book title and borrower name...
Consider the universal relation R = {A, B, C, D, E, F, G, H, I, J} and the set of functional dependencies F = {{A, B}{C}, {A}{D, E}, {B}{F}, {F}{G, H}, {D}{I, J}}. What is the key for R? Decompose R...
Imagine the design of a system used to register students at a university. Discuss the user, task, system, and environmental characteristics (Table 10-10) that should be considered when designing the...
Jim Watanabe was in his new car, driving down I-5, on his way to work. He dreaded the phone call he knew he was going to have to make. The original go-live date for a pilot implementation of Petrie...
What is the function of a DFD in the SDLC?
What functions do routers, gateways, and proxy servers serve in a network?
Review Section 8.2 and the comments about EHR usability. Research the current status of EHR usability and describe all noteworthy developments.
What is the primary objective of the evaluation and selection team in selecting a development strategy?
What is outsourcing?
What are the differences between in-house e-commerce development with packaged solutions and service providers?
Consider the E-R diagram of Figure 9-21. a. Transform this E-R diagram into a set of 3NF relations. b. State and justify all referential integrity rules for the 3NF relations you created in Problem...
Why is there a trend toward giving an increasing fraction of chip area to cache memory?
Derive a minimal state table for an FSM that acts as a three-bit parity generator. For every three bits that are observed on the input w during three consecutive clock cycles, the FSM generates the...
I. Describe the term separation of duties and why it is important in reducing the risk an organization takes on when limiting the chance an employee will violate information security and break the...
Describe how to implement a capacity-limited queue, which uses the functions of a capacity-limited deque to perform the functions of the queue ADT in ways that do not throw exceptions when we attempt...
Write a program that prompts the user for an integer. Pass the integer to a method that determines whether the number is greater than 0; if it is, the method displays the number and passes one less...
Create a program with an enumeration that contains the names of the eight planets in our solar system. Prompt the user for a planet name and use the ordinal () method to display the planets position....
Write an application that prompts the user to enter an integer and displays its square root. Accept the users entry as a String using the next Line() method. Then try to use the Integer. parse Int()...
Write an application that prompts a user for the users month, day, and year of birth and uses the Local Date class to compute the day on which the user will become (or became) 10,000 days old. Save...
The remainder operator _____________. a. Is represented by a forward slash b. Must follow a division operation c. Provides the quotient of integer division d. Is represented by a percent sign
For the Bayes net shown in Figure S13.42, consider the query P(A|h), and the variable elimination ordering B, E, C, F, D. a. In the table below fill in the factor generated at each stepwe did the...
Which of the following is true about a one-to-one relationship? a. They are almost always a mistake. b. They create Cartesian joins in queries. c. They relate two tables using the primary key field...
What prevents a user from entering a reservation for a customer who has not yet been registered in the Customers table?
Which of the following statements is true about a one-to-many relationship? a. Every primary key field participates on the one side. b. Every foreign key field participates on the one side. c. Every...
The ERM emphasizes what part of a relational database? a. Attributes b. Relationships c. Primary key fields d. Foreign key fields
Which of the following is not considered a type of E-R diagram? a. DBDL b. ERM c. Crows foot notation d. Access Relationship window
How do you identify the primary key field in DBDL notation? a. With a circle b. With an underline as well as the abbreviation PK c. With a double underline d. With a key symbol
Which field in the TaskMasterList table is a good candidate for Lookup properties that constrain it with a one-to-many relationship to a one-field table? a. Description b. Per c. Estimate d. TaskID
Which of the following relational database tools does not help you document the relationships between tables? a. SQL b. DBDL c. E-R diagram d. Entity relationship model
If management wanted to start tracking the date the entire project was closed, which table should the field be added to? a. Clients b. Projects c. ProjectLineItems d. TaskMasterList
Which of the following is not a technique that would be used in the process of developing a relational database? a. Normalize the data. b. Review existing data forms and reports. c. Interview those...
Why might you not be able to enforce referential integrity on a one-to-many relationship? a. The table on the one side doesnt have a matching record(s) in the table on the many side. b. The table on...
What is the Computer Fraud and Abuse Act (CFAA) of 1984?
Explain each of the dont cares in Figure 4.18. Figure 4.18 Instruction R-format Tw SW beg RegDst 1 0 X X ALUSIC 0 1 1 0 Memto- Reg 0 1 X X Reg- Write 1 1 0 0 Mem- Mem- Read Write 0 1 0 0 0 0 1 OH 0...
A group of students were debating the efficiency of the five-stage pipeline when one student pointed out that not all instructions are active in every stage of the pipeline. After deciding to ignore...
Consider the data in Table 3.30. and the following FDs: Decompose as necessary to achieve 3NF.
Given AB CDE and B E is R( A, B , C, D, E) in 2NF?
By convention, a cache is named according to the amount of data it contains (i.e., a 4 KiB cache can hold 4 KiB of data); however, caches also require SRAM to store metadata such as tags and valid...
The system described by the equations (a) Use (2-89) to solve for x(k), k 0. (b) Find the output y(z) . (c) Show that (k) in (a) satisfies the property (0) = I. (d) Show that the solution in part (a)...
Section 2.9 gives some standard forms for state equations (simulation diagrams for the control canonical and observer canonical forms). The MATLAB statement generates a standard set of state...
Consider a system described by the coupled difference equation Equation 2-84 y (k+ 2) - v (k)= 0 v(k + 1) + y (k + 1) = u(k) where u(k) is the system input.
Consider the satellite control system of Fig. P5.3-14. The units of the attitude angle (t) is degrees, and the range is 0 to 360 . The sensor gain is H k = 0.02 . (a) Suppose that the input ranges...
Suppose we want returning RTCP reports from receivers to amount to no more than 5% of the outgoing primary RTP stream. If each report is 84 bytes, the RTP traffic is 20 kBps, and there are 1000...
What is the justification for the exponential increase in timeout value proposed by Karn and Partridge? Why, specifically, might a linear (or slower) increase be less desirable?
(a) Find the system response at the sampling instants to a unit step input for the system of Fig. P4.3-2. Plot c(nT) versus time. (b) Verify your results of (a) by determining the input to the...
How wide is a bit on a 1-Gbps link? How long is a bit in copper wire, where the speed of propagation is 2.3 10 8 m/s?
Repeat Problem 2.10-2 for the system described by (a) Find the transfer function Y(z)/U(z). (b) Using any similarity transformation, find a different state model for this system. (c) Find the...
Calculate the bandwidth delay product for the following links. Use one-way delay, measured from first bit sent to first bit received. (a) 10-Mbps Ethernet with a delay of 10 s. (b) 10-Mbps Ethernet...
Provide the type and assembly language instruction for the following binary value: 0000 0010 0001 0000 1000 0000 0010 0000 two .
Provide the type and hexadecimal representation of following instruction: sw $t1, 32($t2)
Provide the type, assembly language instruction, and binary representation of instruction described by the following MIPS fields: op = 0, rs = 3, rt = 2, rd = 3, shamt = 0, funct = 34
Provide the type, assembly language instruction, and binary representation of instruction described by the following MIPS fields: op = 0 x 23, rs = 1, rt = 2, const = 0 x 4
Assume that registers $s0 and $s1 hold the values 0x80000000 and 0xD0000000, respectively. 1. What is the value of $t0 for the following assembly code? add $t0, $s0, $s1 2. Is the result in $t0 the...
Assume $t0 holds the value 0x00101000. What is the value of $t2 aft er the following instructions? $t2, $0, slt $t0 bne $t2, $0, ELSE DONE ELSE: addi $t2, $t2, 2 DONE:
Based on your answers to 3.32 and 3.33, does (3.984375 10 -1 + 3.4375 10 -1 ) + 1.771 10 3 = 3.984375 10 -1 + (3.4375 10 -1 + 1.771 10 3 )?
Using a table similar to that shown in Figure 3.10, calculate 74 divided by 21 using the hardware described in Figure 3.11. You should show the contents of each register on each step. Assume A and B...
What decimal number does the bit pattern 00C000000 represent if it is a twos complement integer? An unsigned integer?
Calculate 3.984375 10 -1 + (3.4375 10 -1 + 1.771 10 3 ) by hand, assuming each of the values are stored in the 16-bit half precision format described in Exercise 3.27 (and also described in the...
This exercise is intended to help you understand the relationship between delay slots, control hazards, and branch execution in a pipelined processor. In this exercise, we assume that the following...
Caches are important to providing a high-performance memory hierarchy to processors. Below is a list of 32-bit memory address references, given as word addresses. 3, 180, 43, 2, 191, 88, 190, 14,...
In this exercise, we will look at the different ways capacity affects overall performance. In general, cache access time is proportional to capacity. Assume that main memory accesses take 70 ns and...
The min method for the UnsortedPriorityQueue class executes in O(n) time, as analyzed in Table 9.2. Give a simple modification to the class so that min runs in O(1) time. Explain any necessary...
Consider a diagram of a telephone network, which is a graph G whose vertices represent switching centers, and whose edges represent communication lines joining pairs of centers. Edges are marked by...
Assume that the number of hosts connected to the Internet at year 2010 is five hundred million. If the number of hosts increases only 20 percent per year, what is the number of hosts in year 2020?
Answer the following questions about Figure 2.2 when the communication is from Maria to Ann: a. What is the service provided by layer 2 to layer 3 at Marias site? b. What is the service provided by...
It is obvious that a router or a switch needs to search to find information in the corresponding table. The searching in a routing table for a datagram network is based on the destination address;...
We need to transmit 100 digitized voice channels using a passband channel of 20 KHz. What should be the ratio of bits/Hz if we use no guard band?
Define constellation diagram and explain its role in analog transmission.
Define digital-to-analog conversion.