The number N factorial, denoted by N!, is defined to be the product of the first N positive integers: N! = 1 2 . . . N For example: 5! = 1 2 3 4 5 = 120 7! = 1 2 3 4 5 6 7 = 5,040 Find...
Give the output of the loop in Exercise 19. Data from Exercise 19 Declare K As Integer For (K = 3; K
What is the output of the code corresponding to the following pseudocode? Declare I, J As Integer For (I = 1; I
What is the output of the code corresponding to the following pseudocode? Declare HelloCount As Integer Set HelloCount = 1 Repeat Repeat Write "Hello" Until HelloCount >= 1 Set HelloCount =...
The factorial of a positive integer N, denoted by N!, is defined by the following: N! = 1 2 . . . N (Note: 0! = 1 ) Using subprograms and functions, create a recursive program to compute N!. The...
Redo Programming Challenge 6 but use a binary search. Bonus: Add pseudocode to check how many iterations must be made for each number entered by the user, and, if you also complete Programming...
Create a Visual Basic Windows application. Use the following names for the solution and project, respectively: Valley Solution and Valley Project. Save the application in the VB2015\Chap01 folder....
Open the Debug Solution (Debug Solution.sln) file contained in the VB2015\Chap06\ Debug Solution-B15 folder. Open the Code Editor window and review the existing code. Start and then test the...
Create an application that displays a circles area and circumference, given its radius. Use the following names for the solution and project, respectively: Circle Solution and Circle Project. Save...
In this exercise, you modify the Net Income or Loss application from Lesson A. Use Windows to make a copy of the Net Solution folder. Rename the copy Net Solution- Print. Open the Net Solution (Net...
In this exercise, you modify the wedding reception application from Exercise 9. The modified application will display the number of rectangular tables needed to seat the bridal party as well as the...
In this exercise, you create an application that displays the name of the artist corresponding to the song title selected in a combo box. Create the application, using the following names for the...
Modify the HeapIntPriorityQueue class written in this chapter to make it configurable in ways similar to Javas PriorityQueue class. Make it possible for the heap to be a min-heap or max-heap. (If you...
Write a method called descending that accepts an array of integers and rearranges the integers in the array to be in descending order using a PriorityQueue as a helper. For example, if the array...
Explain why a class might provide a set method and a get method for an instance variable.
Write a method called depthSum that returns the sum of the values stored in a binary tree of integers weighted by the depth of each value. The method should return the value at the root, plus 2 times...
Write a method called removeLeaves that removes the leaves from a tree. A leaf is a node that has empty left and right subtrees. If your method is called on an empty tree, the method does not change...
Factorials are used frequently in probability problems. The factorial of a positive integer n (written n! and pronounced n factorial) is equal to the product of the positive integers from 1 to n....
Write a line of code that performs each of the following tasks: a) Specify that class PieceWorker inherits from class Employee. b) Call superclass Employees toString method from subclass PieceWorkers...
Write a method called matches that returns a count of the number of nodes in one tree that match nodes in another tree. A match is defined as a pair of nodes that are in the same position in the two...
Suppose we have a hash set that uses the standard mod hash function shown in the chapter and uses linear probing for collision resolution. The starting hash table length is 5, and the table chooses...
Write a method called kthSmallest that accepts a PriorityQueue of integers k and an integer as parameters and returns the kth-smallest integer from the priority queue. For example, if the queue...
Discuss three proper ways in which you can assign superclass and subclass references to variables of superclass and subclass types.
What value is contained in the integer variable size after the following statements are executed?
Show the contents of a queue after the following operations are performed. Assume the queue is initially empty. enqueue(45); enqueue(12); enqueue(28); dequeue(); dequeue(); enqueue(69); enqueue(27);...
Fill in the blanks in each of the following statements: a) Computers process data under the control of sets of instructions called __________. b) The key logical units of the computer are the , , ,,...
What does the following program print? public class Mystery2 { public static void main(String[] args) { int count = 1; while (count
Based on the dangling-else discussion in Exercise 4.27, state the output for each of the following code segments when x is 9 and y is 11 and when x is 11 and y is 9. We eliminated the indentation...
a) Sum the odd integers between 1 and 99, using a for statement. Assume that the integer variables sum and count have been declared. b) Calculate the value of 2.5 raised to the power of 3, using the...
Write a program that prompts the user to enter an integer between 0 and 15 and displays its corresponding hex number. For an incorrect input number, display invalid input. Here are some sample runs:...
Based on the dangling-else discussion in Exercise 4.27, modify the following code to produce the output shown. Use proper indentation techniques. You must not make any additional changes other than...
Write a program that displays all the numbers from 100 to 200 (10 per line) that are divisible by 5 or 6, but not both. Numbers are separated by exactly one space.
Determine whether each statement is true or false. If false, explain why. a) Values of primitive types may be stored directly in a collection. b) A Set can contain duplicate values. c) A Map can...
Write a program that moves the ball in a pane. You should define a pane class for displaying the ball and provide the methods for moving the ball left, right, up, and down, as shown in Figure 15.26c....
The implementations of the methods contains(E e), get(int index), indexOf(E e), lastIndexOf(E e), and set(int index, E e) are omitted in the MyLinkedList class. Implement these methods. Define a new...
Define a new class named BSTWithBFT that extends BST with the following method: /** Display the nodes in a breadth-first traversal */ public void breadthFirstTraversal() Use...
Explain the difference between using a computer program and programming a computer.
Rewrite Listing 21.9 to read the text from a text file. The text file is passed as a command-line argument. Words are delimited by whitespace characters, punctuation marks (,;.:?), quotation marks...
Use the data files from Programming Exercise 12.31 to write a program that enables the user to select a year, gender, and enter a name to display the ranking of the name for the selected year and...
Write a program that finds all prime numbers up to 10,000,000,000. There are approximately 455,052,511 such prime numbers. Your program should meet the following requirements: Your program should...
Write a program that animates the selection-sort algorithm. Create an array that consists of 20 distinct numbers from 1 to 20 in a random order. The array elements are displayed in a histogram, as...
Write a program that prompts the user for a radius and then prints The area and circumference of a circle with that radius The volume and surface area of a sphere with that radius
For each of the following computations in Java, determine whether the result is exact, an overflow, or a roundoff error. a. 2.0 1.1 b. 1.0E6 * 1.0E6 c. 65536 * 65536 d. 1_000_000L * 1_000_000L
An air conditioning unit in a car is being controlled by a microprocessor and a number of sensors. a) Describe the main differences between control and monitoring of a process. b) Describe how the...
Develop a GUI application that displays Unicode characters, as shown in Figure 36.13. The user specifies a Unicode in the text field and presses the Enter key to display a sequence of Unicode...
The owner of a shop observes that on average 18 customers per hour arrive, and there are typically 8 customers in the shop. What is the average length of time each customer spends in the shop?
Compare the way Ada 95 provides polymorphism with that of C++, in terms of programming convenience.
What programming paradigm that nearly all recently designed languages support is not supported by Go?
Prove that every real number with a terminating binary representation (finite number of digits to the right of the binary point) also has a terminating decimal representation (finite number of digits...
Easter Sunday is the first Sunday after the first full moon of spring. To compute the date, you can use this algorithm, invented by the mathematician Carl Friedrich Gauss in 1800: 1. Let y be the...
Draw a flowchart for the algorithm in Exercise E3.14. Data from Exercise E3.14. Draw a flowchart for the algorithm in Exercise E3.13. Data from Exercise E3.13. Draw a flowchart for the algorithm in...
When a device interrupt occurs, how does the processor determine which device issued the interrupt?
Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid...
In the Sequence interface of Worked Example 9.2, add static methods that yield Sequence instances: static Sequence multiplesOf(int n) static Sequence powersOf(int n) For example, Sequence.powersOf(2)...
Calculate the expected time for the following activities. Optimistic Most Likely Pessimistic Expected Time Activity Time Time Time A 3 7 11 13 D 16 E 4 18 F 11 G 4 H. 4 4 12 7 9 O23 5122N M13 24
The editor of a movie is finalising the music score. They will send the final version of the score to the movie producer by email attachment. a) Describe how sampling is used to record the music...
For each of the following examples, determine whether this is an embedded system, explaining why or why not. a. Are programs that understand physics and/or hardware embedded? For example, one that...
Interview a sample of project managers. Divide your sample into two small subsamples: one for managers of information systems projects and one for managers of other types of projects. Ask each...
Use BPMN to depict Hoosier Burgers food-ordering system from Figure 7-5 as a business process model. Figure 7-5 CUSTOMER KITCHEN 1.0 Customer Order Receive and Transform Food Order Receipt Customer...
Consider the three DFDs in Figure 7-25. List three errors (rule violations) on these DFDs. E1 DF1 DF9 DF8 DF1 P1.1 P1.4.1 P1 DS1 DF11 P1.3 DF7 Level 0 DF3 DF2 DF3 Level 1 DF6 P1.2 Level 2 P1.4.2 DF10...
Define the following terms: data, database, DBMS, database system, database catalog, program-data independence, user view, DBA, end user, canned transaction, deductive database system, persistent...
Discuss the similarities and differences between an ontology and a database schema.
What aggregation feature is missing from the EER model? How can the EER model be further enhanced to support it?
Discuss the main differences between the notation for EER schema diagrams and UML class diagrams by comparing how common concepts are represented in each.
What is the relationship between a type and its subtype in a type hierarchy? What is the constraint that is enforced on extents corresponding to types in the type hierarchy?
Discuss the various type constructors. How are they used to create complex object structures?
Discuss the different ways for looping over a query result in PHP.
Discuss the main functions for accessing a database in PEAR DB, and how each is used.
What are PHP auto-global variables? Give some examples of PHP autoglobal arrays, and discuss how each is typically used.
What is the impedance mismatch problem? Which of the three programming approaches minimizes this problem?
How do regular inheritance, multiple inheritance, and selective inheritance differ?
What are the differences between the use of tags in XML versus HTML?
What is the difference between attributes and elements in XML? List some of the important attributes used to specify elements in XML schema.
Specify the following views as queries in XQuery on the company XML schema shown in Figure 13.5. a. A view that has the department name, manager name, and manager salary for every department b. A...
Discuss the naming conventions used for ER schema diagrams.
Consider the following relation: TRIP (Trip_id, Start_date, Cities_visited, Cards_used) This relation refers to business trips made by company salespeople. Suppose the TRIP has a single Start_date...
Consider the ER diagram in Figure 3.24. Assume that a course may or may not use a textbook, but that a text by definition is a book that is used in some course. A course may not use more than five...
Specify the following queries on the database in Figure 5.5 in SQL. Show the query results if each query is applied to the database state in Figure 5.6. a. For each department whose average employee...
Load the records of Exercise 16.31 into expandable hash files based on extendible hashing. Show the structure of the directory at each step, and the global and local depths. Use the hash function...
Describe the mismatch between processor and disk technologies.
Specify the following queries in relational algebra on the database schema given in Exercise 5.14: a. List the Order# and Ship_date for all orders shipped from Warehouse# W2. b. List the WAREHOUSE...
Consider the following functional dependencies: Applicant_ID S Applicant_Name Applicant_ID S Applicant_Address Position_ID S Position_Title Position_ID S Date_Position_Opens Position_ID S Department...
Consider the design of a registration system for a hotel. Following the design specification items in Figure 11-2, briefly describe the relevant users, tasks, and displays involved in such a system....
Describe the advantages of a client/server architecture.
One of the most difficult aspects of using the single location approach to installation is choosing an appropriate location. What factors should be considered in picking a pilot site?
Visit the website for an IT magazine and find an article that discusses business cases. Summarize the article and what you learned from it.
Suppose that the system crashes before the [read_item, T 3 , A] entry is written to the log in Figure 22.1(b). Will that make any difference in the recovery process? Figure 22.1(b) (b) A BCD 30 15 40...
List three characteristics each of traditional and web-based development.
Many financial tools are developed using Microsoft Excel. Identify three applications built using Excel, and describe how they are used in an organization.
How does cloud computing support Web 2.0 applications?
Which symbol is not used in a context diagram?
What has been the impact of the Internet on system architecture?
What is client/server architecture?
What are the three functions that every business information system must carry out, irrespective of system architecture?
What are three emerging trends in user interface design?
What is output security?
What are the seven habits of successful interface designers?
Why is a transparent interface desirable?
What is SaaS?
List two reasons offshoring may be risky.