Rewrite Programming Exercise 7.1 using streams Data from Programming Exercise 7.1 Write a program that reads student scores, gets the best score, and then assigns grades based on the following...
You are cutting off a piece of pie like this, where c is the length of the straight part (called the chord length) and h is the height of the piece. There is an approximate formula for the area:...
Write a pseudocode algorithm to input the height and width of a right-angled triangle and check that these values are positive and less than the maximum values given in question 1.
List and describe the common skills and activities of a project manager. Which skill do you think is most important? Why?
Given the ER schema for the MOVIES database in Figure 3.25, draw an instance diagram using three movies that have been released recently. Draw instances of each entity type: MOVIES, ACTORS,...
Consider the ER schema for the MOVIES database in Figure 3.25. Assume that MOVIES is a populated database. ACTOR is used as a generic term and includes actresses. Given the constraints shown in the...
Specify queries c, d, and f of Exercise 8.18 in both tuple and domain relational calculus. Exercise 8.18 Consider the LIBRARY relational database schema shown in Figure 8.14, which is used to keep...
Consider the LIBRARY relational database schema in Figure 6.6. Create an XML schema document that corresponds to this database schema. Figure 6.6 BOOK Book id Title Publisher_name BOOK AUTHORS...
What is the relationship between user stories and features in agile projects?
Prepare a presentation summarizing JAD and RAD. Explain how they differ from traditional fact-finding methods. What are the main advantages of team-based methods?
What is QA?
What is application development?
Transition graph T accepts language L. Show that if L has a word of odd length, then T has an edge with a label with an odd number of letters.
Derive the circuits that implement the state tables in Figures 6.51 and 6.52. What is the effect of state minimization on the cost of implementation? Present state A B C D E F G Next state w = 0 w =...
Give a C++ code fragment that, given a nn matrix M of type float, replaces M with its transpose. Try to do this without the use of a temporary matrix.
Compute the prefix function for the pattern ababbabbabbababbabb.
Write a program that prompts the user for two integers. Pass them to a recursive method that returns the product of the two integers without using multiplication. In other words, instead of using the...
Which assignment is correct in Java? a. Char aChar = 5.5; b. Char aChar = "W"; c. Char aChar = '*'; d. Char aChar = $;
Are the following statements true or false? a. Running forward checking after the assignment of a variable in backtracking search will ensure that every variable is arc consistent with every other...
Consider a decision network with the following structure, where node U is the utility: a. In the graph above, how do we know if a node is guaranteed to have V P I = 0? b. Can any node be guaranteed...
Match each of the key terms with the definition that best fits it. ____________ Phase of the SDLC, in which the system chosen for development in systems analysis is first described independently of...
What are audit productivity tools? How do they assist auditors?
Explain why you think is important for IT auditors to know about each type of legislation below. Your explanation for each type of legislation should take no less than three paragraphs and...
Suppose the program counter (PC) is set to 0x20000000. 1. What range of addresses can be reached using the MIPS jump-and-link (jai) instruction? (In other words, what is the set of possible values...
Find the z-transform, in closed form, of the number sequence generated by sampling the time function e(t) every T seconds beginning at t = 0 . The function e(t) is specified by its Laplace transform,...
Find the z-transforms of the number sequences generated by sampling the following time functions every T seconds, beginning at t = 0 . Express these transforms in closed form. (a) e(t) = -at 8 (b)...
(a) Show that the transfer function of two systems in parallel, as shown in Fig. P1.1-l(a), is equal to the sum of the transfer functions. (b) Show that the transfer function of two systems in series...
Amplitude-modulated (AM) radios use an oscillator operating at \(455 \mathrm{kHz}\) to demodulate the received signal. This frequency is called the intermediate frequency or IM. Your task is to...
Assume that $s0 holds the value 128 ten . 1. For the instruction add $t0, $s0, $s1, what is the range(s) of values for $s1 that would result in overflow? 2. For the instruction sub $t0, $s0, $s1,...
Using a table similar to that shown in Figure 3.10, calculate 74 divided by 21 using the hardware described in Figure 3.8. You should show the contents of each register on each step. Assume both...
In this exercise, we examine how pipelining affects the clock cycle time of the processor. Problems in this exercise assume that individual stages of the datapath have the following latencies: Also,...
In this exercise, we examine how resource hazards, control hazards, and Instruction Set Architecture (ISA) design can affect pipelined execution. Problems in this exercise refer to the following...
This exercise examines the impact of different cache designs, specifically comparing associative caches to the direct-mapped caches from Section 5.4. For these exercises, refer to the address stream...
Design algorithms for the following operations for a binary tree T: PreorderNext(p): Return the position visited after p in a preorder traversal of T (or null if p is the last node visited). ...
Give a recursive method for removing all the elements from a stack.
Suppose we modify the deterministic version of the quick-sort algorithm so that, instead of selecting the last element in an n-element sequence as the pivot, we choose the element at index n/2. What...
If a port number is 16 bits (2 bytes), what is the minimum header size at the transport layer of the TCP/IP protocol suite?
Assume a private internet uses three different protocols at the data-link layer (L1, L2, and L3). Redraw Figure 2.10 with this assumption. Can we say that, in the data-link layer, we have...
Explain the difference between a required RFC and a recommended RFC.
We have a digital medium with a data rate of 10 Mbps. How many 64-kbps voice channels can be carried by this medium if we use DSSS with the Barker sequence?
Figure 6.35 shows a demultiplexer in a synchronous TDM. If the input slot is 16 bits long (no framing bits), what is the bit stream in each output? The bits arrive at the demultiplexer as shown by...
Figure 6.34 shows a multiplexer in a synchronous TDM system. Each output slot is only 10 bits long (3 bits taken from each input plus 1 framing bit). What is the output stream? The bits arrive at the...
Which of the three analog-to-analog conversion techniques (AM, FM, or PM) is the most susceptible to noise? Defend your answer.
Find the 8-bit data stream for each case depicted in Figure 4.36. Time a. NRZ-I Time b. differential Manchester
In a bit-oriented protocol, should we first unstuff the extra bits and then remove the flags or reverse the process?
There are only three active stations in a slotted Aloha network: A, B, and C. Each station generates a frame in a time slot with the corresponding probabilities p A = 0.2, p B = 0.3, and p C = 0.4...
In Table 10.1, the sender sends dataword 10. A 3-bit burst error corrupts the codeword. Can the receiver detect the error? Defend your answer. Table 10.1 Dataword Codeword Dataword Codeword 101 110...
Exclusive-OR (XOR) is one of the most used operations in the calculation of codewords. Apply the exclusive-OR operation on the following pairs of patterns. Interpret the results. a. (10001) (10001)...
Why are standards important for protocols?
Consider the 5-bit generator, G = 10011, and suppose that D has the value 1010101010. What the value of R?
Consider sender 2 in Figure 7.6. What is the sender's output to the channel (before it is added to the signal from sender 1). Z 2 i,m ? Figure 7.6 Senders T 3510g no 150 299R INRITOnini d=-1 Data...
Argue that for the distance-vector- algorithm in Figure 5.6, each value in the distance vector D(x) is non-increasing and will eventually stabilize in a finite number of steps. Figure 5.6 Node x...
Consider the extended LAN connected using bridges B1 and B2 in Fig. 4-41(b). Suppose the hash tables in the two bridges are empty. List all ports on which a packet will be forwarded for the following...
An entry in the switching table of a virtual-circuit network is normally created during the setup phase and deleted during the teardown phase. In other words, the entries in this type of network...
Assume two 802.11 wireless networks are connected to the rest of the Internet via a router as shown in Figure 15.25. The router has received an IP datagram with the destination IP address 24.12.7.1...
Why does the network-layer protocol need to provide packetizing service to the transport layer? Why cant the transport layer send out the segments without encapsulating them in datagrams?
Distinguish between the process of routing a packet from the source to the destination and the process of forwarding a packet at each router.
Assume that A, B, C, D, and E in Figure 20.36 are autonomous systems (ASs). Find the path vector for each AS using the algorithm in Table 20.3. Assume that the best path in this case is the path...
Show the unabbreviated colon hex notation for the following IPv6 addresses: a. An address with 64 0s followed by 32 two-bit (01)s. b. An address with 64 0s followed by 32 two-bit (10)s. c. An address...
Using the CIDR notation, show the IPv6 address compatible to the IPv4 address 129.6.12.34.
We can define the bandwidth-delay product in a network as the number of packets that can be in the pipe during the round-trip time (RTT). What is the bandwidth-delay product in each of the following...
UDP is a message-oriented protocol. TCP is a byte-oriented protocol. If an application needs to protect the boundaries of its message, which protocol should be used, UDP or TCP?
In SCTP, a packet is carrying two DATA chunks, each containing 22 bytes of user data. What is the size of each DATA chunk? What is the total size of the packet?
In SCTP, the value of the cumulative TSN in a SACK is 23. The value of the previous cumulative TSN in the SACK was 29. What is the problem?
Write a method in Java to accept a string representing an IP address in the form x.y.z.t and change it to an unsigned integer.
Most of the operating systems installed on personal computers come with several client processes, but normally no server processes. Explain the reason.
Add a new row in the ORDERS table with the following data: Order# = 1021, Customer# = 1009, and Order date = July 20, 2009.
How can a sequence be used in a database?
Currently, the contents of the Category column in the BOOKS table are the actual name for each category. This structure presents a problem if one user enters COMPUTER for the Computer category and...
What is the purpose of a role in Oracle 12c?
What is the maximum number of characters allowed in a table alias? a. 10 b. 30 c. 255 d. 256
Which of the following functions can produce different results, depending on the value of a specified column? a. NVL b. DECODE c. UPPER d. SUBSTR
Produce a list of all customer names in which the first letter of the first and last names is in uppercase and the rest are in lowercase.
Determine the total profit generated by sales to customer 1017.
Determine how many orders have been placed by each customer. Do not include in the results any customer who hasnt recently placed an order with JustLee Books.
Whats the difference between a single-row subquery and a multiple-row subquery?
Which of the following queries identifies other customers who were referred to JustLee Books by the same person who referred Jorge Perez? a. SELECT customer# FROM customers WHERE referred = (SELECT...
Determine which customers placed orders for the least expensive book (in terms of regular retail price) carried by JustLee Books.
What does FIND-MAXIMUM-SUBARRAY return when all elements of A are negative?
Find and correct the error in each of the following code segments: a) const int ArraySize = 5; ArraySize = 10; b) Assume var b = new int[10]; for (var i = 0; i
a. If I wish to connect two switches with fiber at a speed of 30 Gbps, what options do I have? b. Which would you choose? Justify your answer. 12b.) I can connect two switches that are 200 m apart at...
Protocols and standards are an important feature of networks. Why is this so?
Show the steps of the CPU fetchexecute cycle for the remaining instructions in the Little Man instruction set.
Consider a more realistic alternative: Suppose a small program is permanently stored in the last few mailbox locations. A BRANCH instruction at location 00, also permanent, will start this program....
Given the message ACCBCAAB*, in which the probabilities of symbols are P(A) = 0.4, P(B) = 0.3, P(C) = 0.2, and P(*) = 0.1, a. find the compressed data using arithmetic coding with a precision of 10...
An analog averager is given by (a) Let x(t) = u(t) u(t 1) find the average signal y(t) using the above integral. Let T = 1. Carefully plot y(t). Verify your result by graphically computing the...
Assume that an average SNMP response message is 100 bytes long. Assume that a manager sends 4,000 SNMP Get commands each second. a. What percentage of a 1 Gbps LAN links capacity would the resulting...
Write an SQL statement to display the SKU, SKU_Description, WarehouseID, WarehouseCity, and WarehouseState of all items not stored in the Atlanta, Bangor, or Chicago warehouse. Do not use the NOT IN...
Explain the three different sets of terms used to describe tables, columns, and rows.
Determine the impulse response h[n]of the feedback system shown in Figure 10.18. Determine if the system is BIBO stable. Figure 10.18: e[n] r[n]- Delay y[n]
A periodic signal x[n] of fundamental period N can be represented by its Fourier series If you consider this a representation of x[n] (a) Is x 1 [n] = x[n N 0 ] for any value of N 0 periodic? If so...
If you have a network of leased lines, you have options for how many sites you connect. Sites can communicate directly or through intermediate sites. a. In a full mesh, every pair of sites will be...
To what extent are the following computer systems instances of artificial intelligence: Supermarket bar code scanners. Web search engines. Voice-activated telephone menus. Internet routing...
Prove that alphabeta pruning takes time O(2 m/2 ) with optimal move ordering, where m is the maximum depth of the game tree.
Consider a version of the vacuum robot that has the policy of going straight for as long as it can; only when it encounters an obstacle does it change to a new (randomly selected) heading. To model...
It was assumed that a given action would have the same cost when executed in any physical state within a given belief state. (This leads to a belief-state search problem with well-defined step...
This exercise explores subsetsuperset relations between belief states in sensor less or partially observable environments. a. Prove that if an action sequence is a solution for a belief state b, it...
For each of the following assertions, say whether it is true or false and support your answer with examples or counterexamples where appropriate. a. An agent that senses only partial information...
Sammys Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas to tourists. Write a program that displays Sammys motto, which is Sammys makes it fun in the sun....
Arithmetic assertions can be written in first-order logic with the predicate symbol