1. Write a brief memo to Zoe explaining the importance of data validation during the input process. 2. Suggest at least three specific data validation checks that might help reduce input errors. 3....
Rewrite Listing 30.1 to display the output in a text area, as shown in Figure 30.30. Listing a 1b2b3b 4b 5 b6bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 7 8bbbbbbbbbbbbbbbbbbbb 9bb10 16 11 12 13 14...
Develop formulas for the hybrid hash-join algorithm for calculating the size of the buffer for the first bucket. Develop more accurate cost estimation formulas for the algorithm.
Select one of the books in the REORDERINFO view and try to change its ISBN. Was an error message displayed when performing this step? If so, what was the cause of the error message?
Minimize each of the Boolean equations from Exercise 2.1. Data From Problem 1 Write a Boolean equation in sum-of-products canonical form for each of the truth tables in Figure 2.80. (a) (b) (c) (d)...
a. Create a class named Salesperson. Data fields for Salesperson include an integer ID number and a double annual sales amount. Methods include a constructor that requires values for both data...
Morgans Department Store distributes bonuses to its salespeople after the holiday rush. Table 9-6 shows the bonuses, which are based on full weeks worked during the season and the number of positive...
In Figure 11.11, show what happens in each of the following cases: Figure 11.11 a. The sender is at the ready state and an error-free ACK arrives. b. The sender is at the blocking state and a...
Write a JSF page to let the user enter taxable income and filing status, as shown in Figure 33.27a. Clicking the Compute Tax button computes and displays the tax, as shown in Figure 33.27b. Use the...
Create a Windows Forms application. Use the following names for the project and solution, respectively: Mills Project and Mills Solution. Save the application in the VB2017\Chap05 folder. Mills...
Create a Windows Forms application. Use the following names for the project and solution, respectively: Florist Project and Florist Solution. Save the application in the VB2017\Chap01 folder. a....
correlating branch predictor uses the behavior of the most recent m executed branches to choose from 2m predictors, each of which is an nbit predictor. A two-level local predictor works in a similar...
Let CNFH = {| is a satisfiable cnf-formula where each clause contains any number of literals, but at most one negated literal}. Show that CNF H P.
Redraw Figure 23.29 when the sender sends 5 packets (0, 1, 2, 3, and 4). Packets 0, 1, and 2 are sent and acknowledged in a single ACK, which arrives at the sender site after all packets have been...
Michael wants a program that calculates and displays the percentage of the total points he contributed to his basketball teams final score. Michael will provide the number of twopoint baskets, the...
In Figures 9.11 to 9.13, both the forwarding table and ARP are doing a kind of mapping. Show the difference between them by listing the input and output of mapping for a forwarding table and ARP....
Convert the QuartsToGallons program to an interactive application. Instead of assigning a value to the number of quarts, accept the value from the user as input. Save the revised program as...
We begin with a computer implemented in single-cycle implementation. When the stages are split by functionality, the stages do not require exactly the same amount of time. The original machine had a...
Like DFS, online DFS is incomplete for reversible state spaces with infinite paths. For example, suppose that states are points on the infinite two-dimensional grid and actions are unit vectors (1,...
If the current value of the PC is 0x00000600, can you use a single branch instruction to get to the PC address as shown in Exercise 2.39? Exercise 2.39 Write the MIPS assembly code that creates the...
a. Create an abstract CardGame class similar to the one described in this chapter. The class contains a virtual deck of 52 playing cards that uses a Card class that holds a suit and value for each...
Programming Exercise 8.5 describes how to perform matrix addition. Suppose you have multiple processors, so you can speed up the matrix addition. Implement the following method in parallel. Write a...
Modify the BarChart program to accept the number of points scored by each player in a season. The bar chart displays one asterisk for each 10 points scored by a player. For example, if a player has...
a. Design application for Bobs E-Z Loans. The application accepts a clients loan amount and monthly payment amount. Output the customers loan balance each month until the loan is paid off. b. Modify...
Modify the single-cycle MIPS processor to implement one of the following instructions. See Appendix B for a definition of the instructions. Mark up a copy of Figure 7.11 to indicate the changes to...
Develop a set of classes for a college to use in various student service and personnel applications. Classes you need to design include the following: PersonA Person contains a first name, last name,...
Because of referential integrity, before any row can be entered into the SECTION table, the CourseID to be entered must already exist in the COURSE table. Write an SQL assertion that will enforce...
Write a program that calculates the energy needed to heat water from an initial temperature to a final temperature. Your program should prompt the user to enter the amount of water in kilograms and...
Execute the CityJail_5.sql script to rebuild the CRIMINALS and CRIMES tables of the City Jail database. The statements at the beginning of this script drop existing tables in your schema with the...
a. Create an application that allows you to enter student data that consists of an ID number, first name, last name, and grade point average. Depending on whether the students grade point average is...
a. Draw the hierarchy chart and then plan the logic for a program that calculates a persons body mass index (BMI). BMI is a statistical measure that compares a persons weight and height. The program...
Suppose T is a binary search tree of height 4 (including the external nodes) that is storing all the integers in the range from 1 to 15, inclusive. Suppose further that you do a search for the number...
Create an abstract class called GeometricFigure. Each figure includes a height, a width, a figure type, and an area. Include an abstract method to determine the area of the figure. Create two...
When silicon chips are fabricated, defects in materials (e.g., silicon) and manufacturing errors can result in defective circuits. A very common defect is for one wire to affect the signal in...
Translate the following call to Schemes COND to C and set the resulting value to y. (COND ( (> x 10) x) (( < x 5) (* 2 x)) ( (= x 7) (+ x 10))
In 1713, Nicolas Bernoulli stated a puzzle, now called the St. Petersburg paradox, which works as follows. You have the opportunity to play a game in which a fair coin is tossed repeatedly until it...
Correct the C++ instructions shown in Figure 3-26. IPO chart information C++ instructions Input original price discount rate (10%) double original = 0.0; double DISC_RATE = 10%; %3D %3D Processing...
Create a class named Billing that includes three overloaded computeBill() methods for a photo book store. When computeBill() receives a single parameter, it represents the price of one photo book...
Create a Windows Forms application. Use the following names for the project and solution, respectively: Baxters Project and Baxters Solution. Save the application in the VB2017\Chap04 folder. Change...
In this exercise, you modify the History Grade application from this chapters Focus lesson. Use Windows to make a copy of the History Solution folder. Rename the copy History Solution-Functions. Open...
Write a program that enables two users to chat. Implement one user as the server (Figure 31.21a) and the other as the client (Figure 31.21b). The server has two text areas: one for entering text and...
a. Design the logic for a program that allows a user to enter 20 numbers, then displays them in the reverse order of entry. b. Modify the reverse-display program so that the user can enter any amount...
In this exercise, we will examine space/time optimizations for page tables. The following list provides parameters of a virtual memory system. 1. For a single-level page table, how many page table...
In this exercise, you will complete the Kramden Inc. application that you created in Exercise 6 in Chapter 2. a. Use Windows to copy the Kramden Solution folder from the VB2017\Chap02 folder to the...
Give a big-Oh characterization, in terms of n, of the running time of the example4 function shown in Code Fragment 3.10. 1 def example1(S): "Return the sum of the elements in sequence S.""" n =...
The following attributes represent data about a movie copy at an online video rental service. Each movie is identified by a movie number and has a title and information about the director and the...
Redraw Figure 11.12 using the following scenario: Figure 11.12 a. The first frame is sent and acknowledged. b. The second frame is sent and acknowledged, but the acknowledgment is lost. c. The second...
Modify the lexical analyzer given in Section 4.2 to recognize the following list of reserved words and return their respective token codes: for (FOR_CODE, 30), if (IF_CODE, 31), else (ELSE_CODE, 32),...
Write an application that throws and catches an ArithmeticException when you attempt to take the square root of a negative value. Prompt the user for an input value and try the Math.sqrt() method on...
Modify the multicycle MIPS processor to implement one of the following instructions. See Appendix B for a definition of the instructions. Mark up a copy of Figure 7.27 to indicate the changes to the...
Each salesperson at Canton Inc. receives a commission based on the amount of his or her sales. The commission rates and additional payment amounts are shown in Figure 4-60. Create a Windows Forms...
San Juan Sailboat Charters (SJSBC) is an agency that leases (charters) sailboats. SJSBC does not own the boats. Instead, SJSBC leases boats on behalf of boat owners who want to earn income from their...
a. Design the logic for a program that allows a user to enter 20 numbers, then displays all of the numbers, the largest number, and the smallest. b. Modify the program in Exercise 3a so that the user...
Modify the CharacterInfo class shown in Figure 7-3 so that the tested character is retrieved from user input. Save the file as InputCharacterInfo.java.
An n ? n matrix is called a positive Markov matrix if each element is positive and the sum of the elements in each column is 1. Write the following method to check whether a matrix is a Markov...
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-Spaces. Open the...
a. Create a class named Circle with fields named radius, diameter, and area. Include a constructor that sets the radius to 1 and calculates the other two values. Also include methods named...
Create the logic for a Mad Lib program that accepts five words from input, then creates and displays a short story or nursery rhyme that uses them.
Specify the following queries in relational algebra on the database schema given in Exercise 5.15: Exercise 5.15 Consider the following relations for a database that keeps track of business trips of...
Suppose the correspondent in Figure 7.23 were mobile. Sketch the additional network-layer infrastructure that would be needed to route the data-gram from the original mobile user to the (now mobile)...
a. Create a program that allows a user to input customer records (ID number, first name, last name, and balance owed) and save each record to a file. Save the program as WriteCustomerList.java. When...
Write an application that computes and displays the day on which you become (or became) 10,000 days old. Save the application as TenThousandDaysOld.java.
The following exercises are based on the Solmaris Condominium Group database shown in Figures 1-21 through 1-25. No computer work is required. 1. Using the types of entities found in the Solmaris...
What does the following SystemVerilog statement do? result = | (data[15:0] & 16'hC820);
The developers of a free online game named Sugar Smash have asked you to develop a class named SugarSmashPlayer that holds data about a single player. The class contains the following fields: the...
Consider the MIPS assembly code below. func1, func2, and func3 are non-leaf functions. func4 is a leaf function. The code is not shown for each function, but the comments indicate which registers are...
A regional telephone company has 10 million subscribers. Each of their telephones is connected to a central office by a copper twisted pair. The average length of these twisted pairs is 10 km. How...
A shipping company uses the following function to calculate the cost (in dollars) of shipping based on the weight of the package (in pounds). Write a program that prompts the user to enter the weight...
Implement a method with signature concatenate(LinkedQueue Q2) for the LinkedQueue class that takes all elements of Q2 and appends them to the end of the original queue. The operation should run in...
Write a program that views, inserts, and updates staff information stored in a database, as shown in Figure 34.27a. The View button displays a record with a specified ID. The Insert button inserts a...
Create XML schema documents and XML DTDs to correspond to the hierarchies shown in Figures 13.14 and 13.15(c). Figures 13.14 Figures 13.15 M STUDENT SECTION DEPARTMENT INSTRUCTOR COURSE1 INSTRUCTOR1...
Show the stack with all activation record instances, including static and dynamic chains, when execution reaches position 1 in the following skeletal program. Assume bigsub is at level 1. function...
a. Carlys Catering provides meals for parties and special events. You created an Event class for the company. The Event class contains two public final static fields that hold the price per guest...
Open the Orders Solution.sln file contained in the VB2017\Chap03\Orders Solution folder. The interface provides a button for adding the number ordered to the total ordered, and a button for...
In this exercise, you create an application that calculates the number of single rolls of wallpaper required to cover a room. Create a Windows Forms application. Use the following names for the...
Write an application named BadSubscriptCaught in which you declare an array of 10 first names. Write a try block in which you prompt the user for an integer and display the name in the requested...
Suppose that in UDPClient.py, after we create the socket, we add the line: clientSocket.bind((, 5432)). Will it become necessary to change UDPServer.py? What are the port numbers for the sockets in...
You designed the new database for City Jail. Now you need to create all the tables for the database. First, create all the tables using the information outlined in Section A. Second, make the...
Create an abstract class named Element that holds properties of elements, including their symbol, atomic number, and atomic weight. Include a constructor that requires values for all three properties...
One of the tasks for an operating system is the job of scheduling computations to be performed by the processor(s) that are part of that system. A subtask that comes up in some processor scheduling...
An IPv6 packet consists of the base header and a TCP segment. The length of data is 320 bytes. Show the packet and enter a value for each field.
1. The SBRU information system includes four major subsystems: Resort relations, Student booking, Accounting and finance, and Social networking. Although you have only worked with the domain model...
Draw a context diagram and a diagram 0 DFD that represents the information system at a typical library.
Write a method called printAcronym that accepts a string as its parameter and prints the first letter of each word of the string as an acronym. For example, the call of printAcronym("Breath of the...
Write a program that uses a bar chart to display the percentages of the overall grade represented by projects, quizzes, midterm exams, and the final exam, as shown in Figure 14.46b. Suppose that...
Design an FSM with one input, A, and two outputs, X and Y. X should be 1 if A has been 1 for at least three cycles altogether (not necessarily consecutively). Y should be 1 if A has been 1 for at...
Define the MyRectangle2D class that contains:? Two double data fields named x and y that specify the center of the rectangle with getter and setter methods. (Assume that the rectangle sides are...
Run the CityJail_8.sql file provided by your instructor to ensure that all necessary tables and constraints are available for this case study. This script isnt included in student data files because...
Each of the following statements pertains to the miss rate of caches. Mark each statement as true or false. Briefly explain your reasoning; present a counterexample if the statement is false. (a) A...
Create a Windows Forms application. Use the following names for the project and solution, respectively: States Capitals Project and States Capitals Solution. Save the application in the VB2017\Chap04...
a. Create an Alien class. Include at least three protected data members of your choice, such as the number of eyes the Alien has. Include a constructor that requires a value for each data field and a...
Add the following IEEE 754 single-precision floating-point numbers. (a) C0D20004 + 72407020 (b) C0D20004 + 40DC0004 (c) (5FBE4000 + 3FF80000) + DFDE4000 (Why is the result counter intuitive? Explain.)
List three additional entities that might appear in an enterprise data model for Pine Valley Furniture Company (Figure 1-3a). CUSTOMER Places Is Placed By ORDER Contains Is Contained In PRODUCT
Prove that the following two languages are undecidable. a. OVERLAP CFG = {G,H| G and H are CFGs where L(G) L(H) }. Adapt the hint in Problem 5.21. b. PREFIX-FREE CFG = {G| G is a CFG where L(G) is...
Consider the following relation: CAR_SALE(Car#, Date_sold, Salesperson#, Commission%, Discount_amt) Assume that a car may be sold by multiple salespeople, and hence {Car#, Salesperson#} is the...
Rewrite Listing 15.13 using a thread to animate a flag being raised. Compare the program with Listing 15.13 by setting the delay time to 10 in both programs. Which one runs the animation faster?...
Design the application logic for a company that wants a report containing a breakdown of payroll by department. Input includes each employees department number, hourly salary, and number of hours...
During an afternoon at work, you receive various requests for data stored in the database. As you fulfill each request, you decide to document the SQL statements you used to find the data to assist...
Using the grammar of Problem 11, draw parse trees for the expressions of Problem 9. Data From Problem 11: Write a BNF description of the precedence and associativity rules defined for the expressions...
Describe how the minimax and alphabeta algorithms change for two-player, nonzero- sum games in which each player has a distinct utility function and both utility functions are known to both players....