Three-letter acronyms are common in the business world. For example, in Java you use the IDE (Integrated Development Environment) in the JDK (Java Development Kit) to write programs used by the JVM...
You modified the RentalDemo program for Sammys Seashore Supplies to accept and display data for an array of three Rental objects. Now, modify the program to use an array of eight Rental objects....
Micks Wicks makes candles in various sizes. Create a class for the business named Candle that contains data fields for color, height, and price. Create get methods for all three fields. Create set...
Create a CourseException class that extends Exception and whose constructor receives a String that holds a college courses department (for example, CIS), a course number (for example, 101), and a...
If a transmitting computer sends an 8-bit binary message 11000111 using an even parity bit. Write the 9-bit data with the parity bit in the most significant bit. If the receiving computer receives...
Using DeMorgans theorem, draw logic diagrams for ABC + AB + BC (a) Using only AND gates and inverters. (b) Using only OR gates and inverters. You may use two-input and three-input AND and OR gates...
Open the Amlie Solution.sln file contained in the VB2017\Chap02\Amlie Solution folder. If necessary, open the designer window. Organize the interface so that it follows the GUI design guidelines...
Create a Windows Forms application. Use the following names for the project and solution, respectively: Moonbucks Project and Moonbucks Solution. Save the application in the VB2017\Chap02 folder....
In this exercise, you learn how to create a list box that allows the user to select more than one item at a time. Open the Multi Solution.sln file contained in the VB2017\Chap05\Multi Solution...
Using De Morgan equivalent gates and bubble pushing methods, redraw the circuit in Figure 2.83 so that you can find the Boolean equation by inspection. Write the Boolean equation. B- C- D- E- Dor...
Implement a function that accepts a PositionalList L of n integers sorted in nondecreasing order, and another value V, and determines in O(n) time if there are two elements of L that sum precisely...
Implement the preorder method in BST using a stack instead of recursion. Write a test program that prompts the user to enter 10 integers, stores them in a BST, and invokes the preorder method to...
Find out what networks are used at your school or place of work. Describe the network types, topological, and switching methods used there.
Look at the computer ads on the business pages of a large daily newspaper and make a list of all the terms used that you dont understand. Save this list and check it from time to time during the...
In this exercise, you modify one of the Waterson Company applications from this chapters Apply lesson. Use Windows to make a copy of the Waterson Solution-Highest folder. Rename the copy Waterson...
Bill has an algorithm, find2D, to find an element x in an n n array A. The algorithm find2D iterates over the rows of A and calls the algorithm arrayFind, of Algorithm 1.12, on each one, until x is...
Solve the previous exercise using a queue instead of stack. That is, suppose you are given an array, A, containing n numbers in order, as in the previous exercise. Describe in pseudocode an efficient...
Give an example set of 10 characters and their associated frequencies so that, in the Huffman tree for this set, every internal node has an external-node child.
In this exercise, you will create a program that displays a table consisting of four rows and three columns. The first column should contain the numbers 10 through 13. The second and third columns...
In this exercise, you will create a program that allows the user to enter an unknown number of sales amounts for each of three car dealerships: Dealership 1, Dealership 2, and Dealership 3. Use a...
Assume that speed = 10 and miles = 5. What is the value of each of the following expressions?
What is output by each of the pseudocode segments in Figure 5-30? a. b. . a = 1 b - 2 C - 5 while a < c a = a + 1 b = b + c endwhile output a, b, c e = 6 f - 7 while d > f d - d + 1 e = e - 1...
Design the logic for a program that outputs every number from 1 through 15 along with its value times 10 and times 100.
Design the logic for a program that outputs numbers in reverse order from 10 down to 0.
Design the logic for a program that allows a user to continuously enter numbers until the user enters 0. Display the sum of the numbers entered.
Suppose that you have declared an array as follows: num values[4] = 0, 0, 0, 0. Which of the following is an allowed operation? a. values[2] = 17 b. input values[0] c. values[3] = values[0] + 10 d....
Create the logic for a program that accepts a users birth month and year and passes them to a method that calculates the users age in the current month and returns the value to the main program to be...
Identify three different classes that might contain each of these objects: a. myBlueDenimShirt b. presidentOfTheUnitedStates c. myPetCat d. myCousinLindsey
An int can hold integers only up to a maximum number. Find an approximation of that maximum number by using fibonacci().
Prove that the following grammar is LL(1): decl ID decl tail decl tail , decl : ID ; (The final ID is meant to be a type name.)
Extend your solution to Exercise 2.21 to build an abstract syntax tree directly, without constructing a parse tree first. Data From exercise 2.21: Build a complete recursive descent parser for the...
A biologist determines that the approximate number, Number, of bacteria present in a culture after a certain number of days, Time, is given by the following formula: Number = BacteriaPresent *...
A university posts its employees salaries at http:// liveexample.pearsoncmg.com/data/Salary.txt. Each line in the file consists of a faculty members first name, last name, rank, and salary (see...
The implementations of the methods addAll, removeAll, retainAll, toArray(), and toArray(T[]) are omitted in the MyList interface. Implement these methods. Test your new MyList class using the code at...
Define a new class named BSTWithNumberOfNonLeaves that extends BST with the following methods: /** Return the number of nonleaf nodes */ public int getNumberofNonLeaves() Use...
List the deliverables from the conceptual data modeling part of the analysis phase of the systems development process.
A year with 366 days is called a leap year. Leap years are necessary to keep the calendar synchronized with the sun because the earth revolves around the sun once every 365.25 days. Actually, that...
What are the six guidelines to follow when drawing DFDs?
What are the advantages of online and batch processing, respectively?
Find a current example of a large-scale grid computing project and describe it in as much detail as you can. What is the purpose of the project? What is the problem being addressed? How is grid...
Assuming you have declared shoeSize to be a variable of type int, which of the following is a valid assignment statement in Java? a. shoeSize = 9; b. shoeSize = 9.5; c. shoeSize = "nine"; d. shoeSize...
Figure 12-26 shows two typical executions of a program that displays a triangle. Create this program by prompting the user for a number of lines to display. The first row of the output contains the...
Consider a proposed new instruction named rpt. This instruction combines a loops condition check and counter decrement into a single instruction. For example, rpt $s0, loop would do the following: if...
For the following C statement, write a minimal sequence of MIPS assembly instructions that does the identical operation. Assume $t0 = A and $s0 is the base address of C. A = C[0] < < 4;
What is the minimum number of cycles needed to completely execute n instructions on a CPU with a k stage pipeline? Justify your formula.
Define a function sumseries that takes a number n as argument and computes the series given here. Take the value of (sumseries 0) to be 0:
Define a function called sumsquares that takes two integers as a parameter and computes the sum of square of numbers from the first number to the second number.
Imagine that the problem in Exercise 3.ROMF, in which two friends try to meet up on the map of Romania, is modified so that one of the friends wants to avoid the other. The problem then becomes a...
Find a state-variable formulation for the system described by the coupled second-order difference equations given. The system output is y(k) , and e 1 (k) and e 2 (k) are the system inputs. y(k) =...
Write a symbolic microprogram routine for the ISZ (increment and skip if zero) instruction defined in Chap. 5 (Table 5-4). Use the microinstruction format of Sec. 7-3. Note that DR = 0 status...
Write the MIPS assembly code to implement the following C code as an atomic set max operation using the lI/sc instructions. Here, the argument shvar contains the address of a shared variable, which...
Suppose you could build a CPU where the clock cycle time was different for each instruction. What would the speedup of this new CPU be over the CPU presented in Figure 4.21 given the instruction mix...
Brewsters Used Cars, Inc. employs several salespeople. Brewster, the owner of the company, has provided a file that contains sales records for each salesperson for the past month. Each record in the...
Create a Windows Forms application. Use the following names for the project and solution, respectively: Cookies Project and Cookies Solution. Save the application in the VB2017\Chap09 folder. a. Copy...
Calculate the time necessary to perform a multiply using the approach given in Figures 3.3 and 3.4 if an integer is 8 bits wide and each step of the operation takes 4 time units. Assume that in step...
Describe in detail an algorithm for reversing a singly linked list L using only a constant amount of additional space.
In Figure 9.7, do you think that system A should first check its cache for mapping from N2 to L2 before even broadcasting the ARP request? Figure 9.7 Figure 9.7 ARP operation LAN System A System B...
Manually simulate the Fletcher algorithm (Figure 10.18) to calculate the checksum of the following bytes: (2B) 16 , (3F) 16 , (6A) 16 , and (AF) 16 . Also show that the result is a weighted checksum....
Repeat Problem P16-9 for D-AMPS. Problem P16-9 Find the efficiency of AMPS in terms of simultaneous calls per megahertz of bandwidth. In other words, find the number of calls that can be used in...
Combine the following three blocks of addresses into a single block: a. 16.27.24.0/26 b. 16.27.24.64/26 c. 16.27.24.128/25
Router A sends two RIP messages to two immediate neighboring routers, B and C. Do the two datagrams carrying the messages have the same source IP addresses? Do the two datagrams have the same...
Assume the shortest path in a graph from node A to node H is A B H. Also assume that the shortest path from node H to node N is H G N. What is the shortest path from node A to node N?
Find the interface identifier if the Ethernet physical address is (F5-A9-23-12-7A-B2) 16 using the format we defined for Ethernet addresses.
Which tables and fields would you access to determine which book titles have been purchased by a customer and when the order shipped? Figure 1-5: ORDERS Order# Customer# Orderdate Shipdate Shipstreet...
Add a new row in the ORDERS table with the following data: Order# = 1022, Customer# = 2000, and Order date = August 6, 2009. Describe the error raised and what caused the error.
Given the following query: SELECT DISTINCT zip, category FROM customers NATURAL JOIN orders NATURAL JOIN orderitems NATURAL JOIN books; Which of the following queries is equivalent? a. SELECT zip...
Use the following SELECT statement to answer. 1 SELECT customer#, COUNT(*) 2 FROM customers JOIN orders USING (customer#) 3 WHERE orderdate > '02-APR-09' 4 GROUP BY customer# 5 HAVING COUNT(*) > 2;...
Which of the following statements is correct? a. If a subquery is used in the outer querys FROM clause, the data in the temporary table cant be referenced by clauses used in the outer query. b. The...
Create a view that lists the name and phone number of the contact person at each publisher. Dont include the publishers ID in the view. Name the view CONTACT.
In a DHT-based network, assume m = 4. If the hash of a node identifier is 18, where is the location of the node in the DHT space?
Assume an ISP uses three leaky buckets to regulate data received from three customers for transmitting to the Internet. The customers send fixed-size packets (cells). The ISP sends 10 cells per...
Show how the tables in your answer to question 4.25 solve the problems you identified in question 4.24.
This question considers representing satisfiability (SAT) problems as CSPs. a. Draw the constraint graph corresponding to the SAT problem ( X 1 X 2 ) ( X 2 X 3 ) . . . ( X n1 X n ) for the...
Write a program that declares a variable named inches, which holds a length in inches, and assign a value. Display the value in feet and inches; for example, 86 inches becomes 7 feet and 2 inches. Be...
Herberts Home Repair estimates each job cost as the cost of materials plus $35 per hour while on the job, plus $12 per hour for travel time to the job site. Create a class that contains a main()...
a. Create a class named Sandwich. Data fields include a String for the main ingredient (such as tuna), a String for bread type (such as wheat), and a double for price (such as 4.99). Include methods...
In each case, determine the problem and fix the program. After you correct the errors, save each file using the same filename preceded with Fix. For example, save DebugFour1.java as...
you created a program named Triangle in which you displayed a seven-line triangle pattern like the one in Figure 6-33 by using a series of println() statements. Now, using your knowledge of loops,...
A personal phone directory contains room for first names and phone numbers for 30 people. Assign names and phone numbers for the first 10 people. Prompt the user for a name, and if the name is found...
You created a Salesperson class with fields for an ID number and sales values. Now, create an application that allows a user to enter values for an array of seven Salesperson objects. Offer the user...
You created a Salesperson class with fields for an ID number and sales values. Now, create an application that allows you to store an array that acts as a database of any number of Salesperson...
Create an abstract NewspaperSubscription class with fields for the subscriber name, address, and rate. Include get and set methods for the name field and get methods for the address and subscription...
Write an application named UseInsurance that uses an abstract Insurance class and Health and Life subclasses to display different types of insurance policies and the cost per month. The Insurance...
Open the Colors Solution.sln file contained in the VB2017\Chap01\Colors Solution folder. If necessary, open the designer window. The interface contains one label control and two buttons. You can use...
In this exercise, you will complete the Sales application that you created in Exercise 8 in Chapter 2. a. Use Windows to copy the Sales Solution folder from the VB2017\Chap02 folder to the...
In this exercise, you modify the Monthly Payment application from this chapters Apply lesson. Use Windows to make a copy of the Payment Solution folder. Rename the copy Payment Solution-DoLoop. Open...
Open the FixIt Solution.sln file contained in the VB2017\Chap05\FixIt Solution folder. Open the Code Editor window and review the existing code. Start and then test the application. Correct any...
Given a memory with a 24-bit address and 8-bit word size, (a) How many bytes can be stored in this memory? (b) If this memory were constructed from 1K 1-bit RAM chips, how many memory chips would be...
Given the input wave forms shown in Figure 3.63, sketch the output, Q, of a D latch. CLK Figure 3.63 Input waveforms of D latch or flip-flop for Exercises 3.3 and 3.5
1. Jesse wants me to investigate GanttProject software to determine whether it would be suitable for SCR. She asked me to prepare a summary of pros and cons, and a sample of screen shots and...
Write a program that reads an integer between 0 and 1000 and adds all the digits in the integer. For example, if an integer is 932, the sum of all its digits is 14. Use the % operator to extract...
Describe an algorithm, relying only on the BinaryTree operations, that counts the number of leaves in a binary tree that are the left child of their respective parent.
In Figure 3-10, the process of buying and planting flowers in the spring was shown using the same structures as the generic example in Figure 3-9. Use the same logical structure as in Figure 3-9 to...
Assume you have created a mechanical robot that can perform the following tasks: Stand up. Sit down. Turn left 90 degrees. Turn right 90 degrees. Take a step. Additionally, the robot can determine...
If p is true and q is false, then ______________. a. p OR q is true b. p OR q is false c. p AND q is true d. p is greater than q
The Drive-Rite Insurance Company provides automobile insurance policies for drivers. Design a flowchart or pseudocode for following: a. A program that accepts insurance policy data, including a...
Create a lottery game application. Generate three random numbers, each between 0 and 9. Allow the user to guess three numbers. Compare each of the users guesses to the three random numbers and...
A report that lists only totals, with no details about individual records, is a(n) _______________ report. a. Accumulator b. Final c. Group d. Summary
Design the logic for a program that allows a user to enter any quantity of numbers until a negative number is entered. Then display the highest number and the lowest number.