Find the class of the following classful IP addresses: a. 130.34.54.12 b. 200.34.2.1 c. 245.34.2.8
In an IPv4 datagram, the value of total-length field is (00A0)16 and the value of the header-length (HLEN) is (5) 16 . How many bytes of payload are being carried by the datagram? What is the...
An IP datagram has arrived with the following partial information in the header (in hexadecimal): 45000054 00030000 2006... a. What is the header size? b. Are there any options in the packet? c. What...
Assume that the network in Figure 20.34 (Problem P20-8) uses distance vector routing with the forwarding table as shown for each node. If node E is added to the network with a link of cost 1 to node...
To understand how the distance vector algorithm in Table 20.1 works, let us apply it to a four-node internet as shown in Figure 20.32 . Table 20.1 Assume that all nodes are initialized first. Also...
Assume a router using RIP has 10 entries in its forwarding table at time t 1 . Six of these entries are still valid at time t 2 . Four of these entries have been expired 70, 90, 110, and 210 seconds...
In a nonpersistent HTTP connection, how can HTTP inform the TCP protocol that the end of the message has been reached?
Explain how a UDP client program (Table 25.13) sleeps until the response comes from the server. Table 25.13 A simple UDP client program 1 import java.net.*; 2 import java.io.*: 3. 4 public class...
In Oracle, what is a database profile?
Use the fact database and patron collection created in the text for use with MongoDB. Write a query to display the only the first name, last name, and age of students that are between the ages of 22...
How would you determine which orders have not yet been shipped to the customer? Figure 1-5: ORDERS Order# Customer# Orderdate Shipdate Shipstreet Shipcity Shipstate Shipzip Shipcost CUSTOMERS...
Display a list of all data contained in the BOOKS table.
Save the changes permanently to the database.
Delete Order# 1005. You need to address both the master order record and the related detail records.
To perform the following activity, refer to the tables in the JustLee Books database. Using the training you have received and speculating on query needs, determine appropriate uses for indexes and...
Assign the account created in Assignment 1 the CUSTOMERREP role.
Which customers live in New Jersey? List each customers last name, first name, and state.
Which orders were placed on or before April 1, 2009? List each order number and order date. Write this query in two different ways.
Produce a list of all customers who live in the state of Florida and have ordered books about computers.
Which of the following queries contains an equality join? a. SELECT title, authorid FROM books, bookauthor WHERE books.isbn = bookauthor.isbn AND retail > 20; b. SELECT title, name FROM books CROSS...
An EMPLOYEES table was added to the JustLee Books database to track employee information. Display a list of each employees name, job title, and managers name. Use column aliases to clearly identify...
Which of the following determines how long ago orders that havent shipped were received? a. SELECT order#, shipdate-orderdate delay FROM orders; b. SELECT order#, SYSDATE - orderdate FROM orders...
A snapshot of the traffic pattern in a cell with 10 users of a wireless system is given as follows: (a) Assuming the call setup/connection and call disconnection time to be zero, what is the average...
A TDMA-based system shown in the Figure, has a total bandwidth of 12.5 MHz and contains 20 control channels with equal channel spacing of 30 kHz. Here, the area of each cell is equal to 8 km2, and...
a. What four things do physical layer standards govern? 4a.) Physical layer standards govern ________. a. Signaling b. Physical connectors c. Both A and B d. Neither A nor B 4b.) Physical layer...
Suppose you are given the observer space representation with matrix and vectors To find a transformation that diagonalizes A o use MATLAB function eigswhich calculates the eigenvalues and...
In a transposition cipher the encryption and decryption keys are often represented as two one-dimension tables (arrays) and the cipher is represented as a piece of software (a program). a. Show the...
According to some political pundits, a person who is radical (R) is electable (E) if he/she is conservative (C), but otherwise is not electable. a. Which of the following are correct representations...
Consider the GBN protocol with a sender window size of 4 and a sequence number range of 1,024. Suppose that at time , the next in-order packet that the receiver is expecting has a sequence number of...
Consider the following procedure for choosing moves in games with chance nodes: Generate some dice-roll sequences (say, 50) down to a suitable depth (say, 8). With known dice rolls, the game tree...
Suppose a knowledge base contains just one sentence, x AsHighAs(x, Everest). Which of the following are legitimate results of applying Existential Instantiation? a. AsHighAs(Everest, Everest ). b....
Many of the computational models of cognitive activities that have been proposed involve quite complex mathematical operations, such as convolving an image with a Gaussian or finding a minimum of the...
Which of the following are true and which are false? Give brief explanations. a. In a fully observable, turn-taking, zero-sum game between two perfectly rational players, it does not help the first...
LetHx be a random variable denoting the handedness of an individual x, with possible values l or r. A common hypothesis is that left-or right-handedness is inherited by a simple mechanism; that is,...
Choose the best data type for each of the following so that any reasonable value is accommodated but no memory storage is wasted. Give an example of a typical value that would be held by the...
Suppose that a class named Bicycle contains a private nonstatic integer named height, a public nonstatic String named model, and a public static integer named wheels. Which of the following are legal...
Which of the following is typically used in a flowchart to indicate a decision? a. Square b. Rectangle c. Oval d. Diamond
Which of the following statements correctly outputs the names of voters who live in district 6 and all voters who live in district 7? a. if(district == 6 || 7) System.out.println("Name is " + name);...
You can use the ____________ statement to terminate a switch statement. a. switch b. break c. case d. end
In the game Rock Paper Scissors, two players simultaneously choose one of three options: rock, paper, or scissors. If both players choose the same option, then the result is a tie. However, if they...
A String variable name is a ____________. a. Literal b. Value c. Constant d. Reference
Suppose that you declare two String objects as: String word1 = new String("happy"); String word2; When you ask a user to enter a value for word2, if the user types happy, the value of word1 == word2...
Suppose that a String is declared as: String aStr = new String("lima bean"); The value of aStr.equals("Lima Bean") is ____________. a. True b. False c. Illegal d. Unknown
Suppose that you create two String objects: String name1 = new String("Jordan"); String name2 = new String("Jore"); The expression name1.compareTo(name2) has a value of ____________. a. True b. False...
If String movie = new String("Finding Dory");, the value of movie. indexOf('i') is ____________. a. True b. False c. 1 d. 2
Joining Strings with a plus sign is called ____________. a. Chaining b. Concatenation c. Parsing d. Linking
For an alternative to the String class, and so that you can change a Strings contents, you can use ____________. a. char b. StringHolder c. StringBuilder d. StringMerger
Unlike when you create a String, when you create a StringBuilder, you must use the keyword ____________. a. buffer b. new c. null d. class
Name at least three classes to which each of these objects might belong: a. myGrandmothersBrooch b. eggsBenedict c. cookieMonster
Create an abstract Division class with fields for a companys division name and account number, and an abstract display() method. Use a constructor in the superclass that requires values for both...
In object-oriented programming terminology, an unexpected or error condition is a(n)____________. a. Anomaly b. Exception c. Deviation d. Aberration
A try block includes all of the following elements except ____________. A. The keyword try B. The keyword catch C. Curly braces D. Statements that might cause exceptions
The Double.parseDouble() method requires a String argument, but it fails if the String cannot be converted to a floating-point number. Write an application in which you try accepting a double input...
You created an application named QuartsToGallonsInteractive that accepts a number of quarts from a user and converts the value to gallons. Now, add exception-handling capabilities to this program and...
a. Write an application that allows a user to enter a filename and an integer representing a file position. Assume that the file is in the same folder as your executing program. Access the requested...
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, DebugThirteen1.java will become...
Create an application that calculates and displays the amount of a homeowners property tax. The tax is 1.35% of the propertys assessed value, which will be entered by the user. a. Prepare a Planning...
In addition to the sequence structure, which of the following control structures is used in flowchart A in Figure 5-46? a. Selection b. Repetition c. Both a and b. -0- 0-0-E-C-E-H
The items in a list box belong to which collection? a. Items b. List c. ListItems d. Values
Which of the following is a valid header for a procedure that receives a copy of the value stored in a String variable? a. Private Sub DisplayName(ByCopy strName As String) b. Private Sub DisplayName...
Express the following base 10 numbers in 12-bit fixed-point sign/ magnitude format with six integer bits and six fraction bits. Express your answer in hexadecimal. (a) 30.5 (b) 16.25 (c) 8.078125
A majority gate produces a TRUE output if and only if more than half of its inputs are TRUE. Complete a truth table for the three-input majority gate shown in Figure 1.41. 8-MAJ-Y Figure 1.41...
Ben Bitdiddle has invented a circuit with the transfer characteristics shown in Figure 1.47 that he would like to use as a buffer. Will it work? Why or why not? He would like to advertise that it is...
Write a Python class that extends the Progression class so that each value in the progression is the absolute value of the difference between the previous two values. You should include a constructor...
Write a program that prompts the user to enter two strings and tests whether the second string is a substring of the first string. Suppose the neighboring characters in the string are distinct....
What is the worst-case asymptotic running time for performing n deletions from a SortedTableMap instance that initially contains 2n entries?
Most modern computing in organizations is based on clientserver models. Explain why this tends to be the case. Give an example of clientserver computing that you are familiar with and explain the...
In this exercise, you modify the Cerruti Company application from this chapters Apply lesson. Use Windows to make a copy of the Cerruti Solution folder. Rename the copy Modified Cerruti Solution....
In this exercise, you modify the Check Digit application from this chapters Apply lesson. Use Windows to make a copy of the Check Digit Solution folder. Rename the copy Check Digit Solution-Hyphens....
Open the Computer Solution.sln file contained in the VB2017\Chap08\Computer Solution folder. The interface allows the user to enter the number of either new or refurbished computers sold. Open the...
Explain the problems in your example in question 4.23.
Write and run the SQL statements necessary to create the tables and their referential integrity constraints. For the database solutions for the Review Questions about the Art-Course-Database, see the...
Describe how to perform the operation findAllElements(k), as defined in the previous exercise, in an ordered set of key-value pairs implemented with a binary search tree T, and show that it runs in...
Suppose you are working for a large dog adoption organization and are asked to build a website showing all the dogs that your organization currently knows of that are waiting to be placed in loving...
Consider a method, remove(e), which removes e from whichever list it belongs to, in a list-based implementation of a union-find structure. Describe how to modify the list-based implementation so that...
Let S be an array of n elements on which a total order relation is defined. An inversion in S is a pair of indices i and j such that i S[j]. Describe an algorithm running in O(n log n) time for...
Suppose we represent a graph G having n vertices with an adjacency matrix. Why, in this case, would inserting an undirected edge in G run in O(1) time while inserting a new vertex would take O(n 2 )...
Define SUBGRAPH-ISOMORPHISM as the problem that takes a graph, G, and another graph, H, and determines if H is isomorphic to a subgraph of G. That is, the problem is to determine whether there is a...
Choose a simple childrens game and describe its logic, using a structured flowchart or pseudocode. For example, you might try to explain Rock, Paper, Scissors; Musical Chairs; Duck, Duck, Goose; the...
A file named MAINTENANCE04-01.jpg is included with your downloadable student files. Assume that this program is a working program in your organization and that it needs modifications as described in...
The statements executed within a loop are known collectively as the _______________. a. Loop body b. Loop controls c. Sequences d. Sentinels
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.
The subscripts of any array are always __________. a. Integers b. Fractions c. Characters d. Strings of characters
Glen Ross Vacation Property Sales employs seven salespeople, as shown in the Table 6-5. ID Number Salesperson Name 103 Darwin 104 Kratz 201 Shulstad 319 Fortune 367 Wickert 388 Miller 435 Vick Table...
Geraldines Landscaping Service and Gerards Lawn Maintenance are merging their businesses and want to merge their customer files. Each file contains a customer number, last name, address, and property...
In the Game Zone section of Chapter 5, you designed a guessing game in which the application generates a random number and the player tries to guess it. After each guess, you displayed a message...
Every class has _________. a. Exactly one constructor b. At least one constructor c. At least two constructors d. A default constructor and a programmer-written constructor
When you write a constructor that receives no parameters, _________. a. The automatically-created constructor no longer exists b. It becomes known as the default constructor c. Both of the above d....
Let S = {M| M is a DFA that accepts w R whenever it accepts w}. Show that S is decidable.
Create a UsedCarException class that extends Exception; its constructor receives a value for a vehicle identification number (VIN) that is passed to the parent constructor so it can be used in a...
Errors in a computer program can be classified according to when they are detected and, if they are detected at compile time, what part of the compiler detects them. Using your favorite imperative...
Explain what would happen to the algorithms and the time complexity of an array implementation of the stack if the top of the stack were at position 0.
Write a program that uses the class Calculator in Listing 9.12 to create a more powerful calculator. This calculator will allow you to save one result in memory and call the result back. The commands...
Imagine a candy bar that has k places where it can be cut. You would like to know how many different sequences of cuts are possible to divide the bar into pieces. For example, if k is 3, you could...
Repeat any of the previous programming projects using a JavaFX graphical user interface. Previous programming projects Write a Java program that serves as a primitive web browser. For this assignment...
Explain type checking in Smalltalk.
What is the output of code corresponding to the following pseudocode? Declare N As Integer Declare K As Integer Declare X[100] As Integer Set N = 4 Set K = 1 While K
What is the output of code corresponding to the following pseudocode? Suppose that the file "data" consists of the following records: "Huey",1,2 "Dewey",4,5 "Louie",7,8 Declare Ducks[10] As String...
Define a new class named BSTWithHeight that extends BST with the following method: /** Return the height of this binary tree */ public int height() Use...
Design and write a complete test program to test if the MyArrayList class in Listing 24.2 meets all requirements. Data from Listing 24.2 1 publ1c class MyArrayList 1mplementS MyList { publ1c stat 1c...