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...
Figure 2.8 illustrates the basic architecture for a three-tier database system. This system can be viewed as an IPO system. What is the input for this system? What environmental element generates the...
Whenever a computer is idle, we can either put it in stand by (where DRAM is still active) or we can let it hibernate. Assume that, to hibernate, we have to copy just the contents of DRAM to a...
Given the input waveforms shown in Figure 3.64, sketch the output, Q, of a D latch. CLK Figure 3.64 Input waveforms of D latch or flip-flop for Exercises 3.4 and 3.6
Write an application that displays a series of at least eight student ID numbers (that you have stored in an array) and asks the user to enter a test letter grade for the student. Create an Exception...
Design an interface named Colorable with a void method named howToColor(). Every class of a colorable object must implement the Colorable interface. Design a class named Square that extends...
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-Advanced. Open the...
Draw the AVL tree resulting from the removal of the entry with key 62 from the AVL tree of Figure 11.13b. 4 62 44 78) 50 88 48 54 T4 T2 (b)
Create a JavaFX application with at least six labels that contain facts about your favorite topicfor example, the French Revolution or astronomy. Every time the user clicks a Button, remove one of...
In the following exercises, you will use the data in the Solmaris Condominium Group database shown in Figures 1-21 through 1-25. (If you use a computer to complete these exercises, use a copy of the...
Programming Exercise 7.35 presents a console version of the popular hangman game. Write a GUI program that lets a user play the game. The user guesses a word by entering one letter at a time, as...
1. The head DBA has requested the creation of a sequence for the primary key columns of the Criminals and Crimes tables. After creating the sequences, add a new criminal named Johnny Capps to the...
a. Radio station KJAVA wants a class to keep track of recordings it plays. Create a class named Recording that contains fields to hold methods for setting and getting a Recordings title, artist, and...
Consider the data distribution of the COMPANY database, where the fragments at sites 2 and 3 are as shown in Figure 23.3 and the fragments at site 1 are as shown in Figure 3.6. For each of the...
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...
A synchronizer is built from a pair of flip-flops with t setup = 50 ps, T0 = 20 ps, and = 30 ps. It samples an asynchronous input that changes 108 times per second. What is the minimum clock period...
Write a function called changeColor that takes as input a picture and an amount to increase or decrease a color by and a number 1 (for red), 2 (for green), or 3 (for blue). The amount will be a...
a. Consider an audio conference call in Skype with N > 2 participants. Suppose each participant generates a constant stream of rate r bps. How many bits per second will the call initiator need to...
Create an application with a JFrame and at least six labels that contain facts about your favorite topicfor example, the French Revolution or astronomy. Every time the user clicks a JButton, remove...
To regulate its output flow, a router implements a weighted queueing scheme with three queues at the output port. The packets are classified and stored in one of these queues before being...
The balance factor of an internal node v of a binary tree is the difference between the heights of the right and left subtrees of v. Show how to specialize the Euler tour traversal to print the...
Your downloadable files for Chapter 7 include DEBUG07-01.txt, DEBUG07-02.txt, and DEBUG07-03.txt. Each file starts with some comments that describe the problem. Comments are lines that begin with two...
Consider the 3 Ã 3 world shown in Figure 17.14(a). The transition model is the same as in the 4 Ã 3 Figure 17.1: 80% of the time the agent goes in the direction it selects; the rest of...
Write a program that obtains the execution time for finding all the prime numbers less than 8,000,000, 10,000,000, 12,000,000, 14,000,000, 16,000,000, and 18,000,000 using the algorithms in Listings...
There are eight small islands in a lake, and the state wants to build seven bridges to connect them so that each island can be reached from any other one via one or more bridges. The cost of...
A Queue Abstract Data type (ADT) has these associated operations: Create queue Add item to queue Remove item from queue The queue ADT is to be implemented as a linked list of nodes. Each node...
Create an IPO chart for each of the following methods: a. The method that calculates the amount owed on a restaurant check, including tip b. The method that calculates the cost to drive your car a...
Create a Mad Libs program that asks the user to provide at least four or five words, and then create and display a short story or nursery rhyme that uses them. Save the file as MadLib.java.
You developed classes that work with catering event information for Carlys Catering. Now modify the Event and EventDemo classes as follows: Modify the Event class to include an integer field that...
In this exercise, you modify the Shipping Depot application from Exercise 13. Use Windows to make a copy of the Shipping Depot Solution folder. Rename the copy Modified Shipping Depot Solution. Open...
Design an application for a pizzeria. The user makes pizza order choices from list boxes, and the application displays the price. The user can choose a pizza size of small ($7), medium ($9), large...
Carlys Catering provides meals for parties and special events. Write a program that prompts the user for the number of guests attending an event and then computes the total price, which is $35 per...
Write an application that allows a user to enter any number of student quiz scores until the user enters 99. If the score entered is less than 0 or more than 10, display an appropriate message and do...
In the childrens game hot potato, a group of n children sit in a circle passing an object, called the potato, around the circle (say in a clockwise direction). The children continue passing the...
Based on the EER diagram constructed for Problem and Exercise 14, develop a sample definition for each entity type, attribute, and relationship in the diagram. Data from Exercise 14. Develop an EER...
The LocalDate class includes an instance method named lengthOfMonth() that returns the number of days in the month. Write an application that uses methods in the LocalDate class to calculate how many...
Create a class named Person that holds the following fields: two String objects for the persons first and last name and a LocalDate object for the persons birthdate. Create a class named Couple that...
Write an application that asks a user to type an even number or the sentinel value 999 to stop. When the user types an even number, display the message Good job! and then ask for another input. When...
1. To what events must the ticket-processing system respond? List each event, the type of event, the resulting use case, and the actor(s). Think carefully about who the actors are. Does the officer...
In a sensor network, the energy consumed by different functions by a sensor is as follows: Assume the total number of nodes as P, the number of cluster heads to be m, the number of sensor nodes which...
The Little Prince Computer (LPC) is a mutant variation on the LMC. (The LPC is so named because the differences are a royal pain.) The LPC has one additional instruction. The extra instruction...
Draw the hierarchy chart and design the logic for a program that calculates the projected cost of a remodeling project. Assume that the labor cost is $30 per hour. Design a program that prompts the...
Write a self-checking testbench for Exercise 4.6. Create a test vector file containing all 16 test cases. Simulate the circuit and show that it works. Introduce an error in the test vector file and...
Suppose that a data file contains a sequence of 8-bit characters such that all 256 characters are about equally common: the maximum character frequency is less than twice the minimum character...
Suppose we want to extend the PositionalList abstract data type with a method, findPosition(e), that returns the first position containing an element equal to e (or null if no such position exists)....
Show the n leftmost bits of the following network-addresses/masks that can be used in a forwarding table. a. 170.40.11.0/24 b. 110.40.240.0/22 c. 70.14.0.0./18
Your company receives the following memo. First, based on the memo, create an initial database design (E-R model) for the City Jail that indicates entities, attributes (columns), primary keys, and...
Write an application that determines whether a phrase entered by the user is a palindrome. A palindrome is a phrase that reads the same backward and forward without regarding capitalization or...
Define the function majority n as in Problem 9.24. Show that it may be computed with O(n) size circuits. Problem 9.24. Recall that you may consider circuits that output strings over {0,1} by...
Write a method that returns the sum of all the elements in a specified column in a matrix using the following header:public static double?sumColumn(double[][] m,?int?columnIndex)Write a test program...
Software Haven sells a software package that is available in three editions. The application should display the price of the edition a customer wants to purchase. The retail prices for the Ultimate,...
Design a class named Triangle that extends GeometricObject. The class contains: Three double data fields named side1, side2, and side3 with default values 1.0 to denote three sides of the triangle. ...
Create a Windows Form application. Use the following names for the project and solution, respectively: State Capital Project and State Capital Solution. Save the application in the VB2017\Chap05...
Alice used a transposition cipher to encrypt her messages to Bob. For added security, she encrypted the transposition cipher key using a substitution cipher, and kept the encrypted cipher in her...
Consider the variable elimination algorithm in Figure 14.11. a. Section 14.4 applies variable elimination to the query P(Burglary | JohnCalls = true,MaryCalls = true). Perform the calculations...
What is the maximum overhead in byte-stuffing algorithm?
Suppose you have n rooms that you would like to connect in a communication network in one of the dormitories of Flash University. You have modeled the problem using a connected, undirected graph, G,...
Write a server that tracks the number of the clients connected to the server. When a new connection is established, the count is incremented by 1. The count is stored using a random-access file....
We wish to transmit an n-bit message to a receiving agent. The bits in the message are independently corrupted (flipped) during transmission with probability each. With an extra parity bit sent...
Allow a user to enter any number of double values up to 15. The user should enter 99999 to quit entering numbers. Display an error message if the user quits without entering any numbers; otherwise,...
Write an HDL module for a hexadecimal seven-segment display decoder. The decoder should handle the digits A, B, C, D, E, and F as well as 09.
An auto rental company wants to develop an automated system that can handle car reservations, customer billing, and car auctions. Usually a customer reserves a car, picks it up, and then returns it...
A noiseless 4-kHz channel is sampled every 1 msec. What is the maximum data rate? How does the maximum data rate change if the channel is noisy, with a signal-to-noise ratio of 30 dB?
Two regional banks with similar geographic territories merged to form HudsonBanc. Both banks had credit card operations and operated billing systems that had been internally developed and upgraded...
In this exercise, you will complete the Raises and New Salaries application that you created in Exercise 5 in Chapter 2. a. Use Windows to copy the Salary Solution folder from the VB2017\Chap02...
Create a Windows Forms application. Use the following names for the project and solution, respectively: Salary Project and Salary Solution. Save the application in the VB2017\Chap05 folder. At the...
In this exercise, you modify the Savings Account application from this chapters Apply lesson. Use Windows to make a copy of the Savings Solution folder. Rename the copy Savings Solution-Advanced....
Give a big-Oh characterization, in terms of n, of the running time of the example1 function shown in Code Fragment 3.10. 1 def example1(S): "Return the sum of the elements in sequence S.""" n =...
Explain why a router using link-state routing needs to receive the whole LSDB before creating and using its forwarding table. In other words, why cant the router create its forwarding table with a...
A. You need about 20 SERVICE transactions in the database. Write the needed SQL statements for any needed additional SERVICE transactions and insert the data into your database. B. Design a data...
Create a Windows Forms application. Use the following names for the project and solution, respectively: OnYourOwn Project and OnYourOwn Solution. Save the application in the VB2017\Chap02 folder....
The following three tables store information on students, assigned exercises, and exercise submission in LiveLab. LiveLab is an automatic grading system for grading programming exercises. The...
Many processor architectures have a load with post-increment instIt is not possible to implement this instruction without either modifying the register file (adding another write port) or making the...
Create the logic for a program that calls a method that computes and returns a homeowners profit from the homes sale. Arguments passed to the method include the sale price and the following which...
Write a program that displays a circle of radius 10 pixels filled with a random color at a random location on a pane, as shown in Figure 15.29b. When you click the circle, it disappears and a new...
a. Create a CollegeCourse class. The class contains fields for the course ID (for example, CIS 210), credit hours (for example, 3), and a letter grade (for example, A). Include get and set methods...
Open the Wedding Solution.sln file contained in the VB2017\Chap04\Wedding Solution folder. The application should display the number of round tables needed to seat only the guests at a wedding...
Create a Building class and two subclasses, House and School. The Building class contains fields for square footage and stories. The House class contains additional fields for number of bedrooms and...
Complete the following tasks. In each exercise, represent your answer in both DBDL and with a diagram. You may use any of the styles presented in this chapter for the diagram. 1. Design a database to...
For each of the following statements, either prove it is true or give a counterexample. a. If P(a | b, c) = P(b | a, c), then P(a | c) = P(b | c) b. If P(a | b, c) = P(a), then P(b | c) = P(b) c. If...
Mad Libs is a childrens game in which they provide a few words that are then incorporated into a silly story. The game helps children understand different parts of speech because they are asked to...
Design two adders: a 64-bit ripple-carry adder and a 64-bit carry look ahead adder with 4-bit blocks. Use only two-input gates. Each two-input gate is 15 m 2 , has a 50 ps delay, and has 20 fF of...
Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, and computes the total and average of the input values (not counting...
Complete the following tasks: a. Design a class named PhoneCall with four fields: two strings that hold the 10-digit phone numbers that originated and received the call, and two numeric fields that...
Go to the websites for project management tools (besides Microsoft Project), such as Apptivo (www.apptivo.com), GanttProject (www.ganttproject.biz), Gantter (www.gantter.com), and smartsheet...
Revise GraphView in Listing 28.6 to display a weighted graph. Write a program that displays the graph in Figure 29.1 as shown in Figure 29.25. (Instructors may ask students to expand this program by...
In a network using the Go-Back-N protocol with m = 3 and the sending window of size 7, the values of variables are S f = 62, S n = 66, and R n = 64. Assume that the network does not duplicate or...
a. Using the Die class, create a version of the dice game Pig that a user can play against the computer. The object of the game is to be the first to score 100 points. The user and computer take...
Bob has a set A of n nuts and a set B of n bolts, such that each nut in A has a unique matching bolt in B. Unfortunately, the nuts in A all look the same, and the bolts in B all look the same as...
Open the Gross Pay Solution.sln file contained in the VB2017\Chap08\Gross Pay Solution folder. The interface provides a text box for entering the number of hours an employee worked. It also provides...
Calculate 3.41796875 10 -3 (6.34765625 10 -3 1.05625 10 2 ) 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...
Playing cards are used in many computer games, including versions of such classics as solitaire, hearts, and poker. Design a Card class that contains a character data field to hold a suit (s for...
Write a program in MIPS assembly language to convert an ASCII number string containing positive and negative integer decimal strings, to an integer. Your program should expect register $a0 to hold...
The accountant at Canton Manufacturing Company wants you to create an application that calculates an assets annual depreciation using the double-declining balance and sum-of-the-years digits methods....
Each salesperson at Rembrandt Auto-Mart is assigned an ID number that consists of five characters. The first three characters are numbers. The fourth character is a letter: either the letter N if the...
Write pseudocode for a program that computes the first and last digit of a number. For example, if the input is 23456, the program should print 2 and 6. Hint: %, Math.log10.
Write three HDL modules for the factored parade mode traffic light controller from Example 3.8. The modules should be called controller, mode, and lights, and they should have the inputs and outputs...
A sentence is in disjunctive normal form (DNF) if it is the disjunction of conjunctions NORMAL FORM of literals. For example, the sentence (A B C) (A C) (B C) is in DNF. a. Any propositional...
This exercise explores how exception handling affects pipeline design. The first three problems in this exercise refer to the following two instructions: Instruction 1...................Instruction 2...
Can you find an analogy in our daily life as to when we use two separate connections in communication similar to the control and data connections in FTP?