Write a program that obtains the execution time for finding the GCD of every two consecutive Fibonacci numbers from the index 40 to index 45 using the algorithms in Listings 22.3 and 22.4. Your...
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...
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...
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...
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...
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...
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....
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...
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...
Suppose you are given the following axioms: 1. 0 3. 2. 7 9. 3. x x x. 4. x x x + 0. 5. x x+ 0 x. 6. x, y x + y y + x. 7. w, x, y, z w y x z w + x y + z. 8. x, y, z x y y z x z 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...
Map the EER diagrams in Figures 4.9 and 4.12 into relational schemas. Justify your choice of mapping options. Figures 4.9 Figure 4.12 Salary Shift Model Capacity Weight M. WORKS ON N EMPLOYEE N...
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,...
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...
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...
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...
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...
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,...
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...
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...
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....
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...
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...
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...
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...
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))
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...
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...
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...
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...
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...
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...
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...
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),...
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 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...
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...
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 =...
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...
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...
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.
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...
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...
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...
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...
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...
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...
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...
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.
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...
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...
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...
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...
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...
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...
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. 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...
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...
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)...
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...
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...
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...
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...
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...
What does the following SystemVerilog statement do? result = | (data[15:0] & 16'hC820);
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...
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...
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...
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...
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...
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...
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...
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...
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...
Draw a context diagram and a diagram 0 DFD that represents the information system at a typical library.
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.
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
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...
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...
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...
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...
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.)
Assume a runner runs 14 kilometers in 45 minutes and 30 seconds. Write a program that displays the average speed in miles per hour.
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...
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....
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...
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...
Carlys Catering provides meals for parties and special events. You have developed a class that holds catering event information and an application that tests the methods using four objects of the...
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...
Draw the hierarchy chart and design the logic for a program that calculates service charges for Hazels Housecleaning service. The program contains housekeeping, detail loop, and end-of-job modules....
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?...
Rapid advancements in areas such as machine learning and predictive analytics in data science are affecting the daily operations of many IT departments. What should a systems analyst do to stay...
Produce a list of information about all existing constraints on the STORE_REPS table.
Use the web to locate the lyrics to the traditional song The Twelve Days of Christmas. The song contains a list of gifts received for the holiday. The list is cumulative so that as each day passes, a...
Design an application for the Sublime Sandwich Shop. The user makes sandwich order choices from list boxes, and the application displays the price. The user can choose from three main sandwich...