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...
Discuss three proper ways in which you can assign superclass and subclass references to variables of superclass and subclass types.
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...
Create an application, using the following names for the solution and project, respectively: Dahlia Solution and Dahlia Project. Save the application in the VB2015\ Chap04 folder. Create the...
Patti Garcia owns two cars, referred to as Car 1 and Car 2. She wants to drive one of the cars to her vacation destination, but shes not sure which one (if any) would cost her the least amount in...
What value is contained in the integer variable size after the following statements are executed?
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...
Create an application, using the following names for the solution and project, respectively: Jerome Solution and Jerome Project. Save the application in the VB2015\ Chap04 folder. Create the...
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);...
In this exercise, you modify the Brazilian Tea application from Exercise 2. Use Windows to make a copy of the Tea Solution folder. Rename the copy Modified Tea Solution. Open the Tea Solution (Tea...
Create a Visual Basic Windows application. Use the following names for the solution and project, respectively: Concert Solution and Concert Project. Save the application in the VB2015\Chap05 folder....
In this exercise, you modify the Treeline Resort application from this lesson. Use Windows to make a copy of the Treeline Solution folder. Rename the copy Modified Treeline Solution. Open the...
Create an application, using the following names for the solution and project, respectively: Marshall Solution and Marshall Project. Save the application in the VB2015\ Chap05 folder. Create 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:...
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.
This exercise will show you how to generate and display random numbers containing decimal places. Open the Random Double Solution (Random Double Solution.sln) file contained in the...
In this exercise, you modify the Carillo application from Exercise 13. Use Windows to make a copy of the Carillo Solution folder. Rename the copy Modified Carillo Solution. Open the Carillo Solution...
In this exercise, you modify the application from Exercise 2. Use Windows to make a copy of the Zip Solution folder. Rename the copy Modified Zip Solution. Open the Zip Solution (Zip Solution.sln)...
Modify Solution 2 shown earlier in Figure 6-4. The solution should now keep track of the number of times Sahirahs laser beam missed the spider. After saying You are safe now. The spider is dead.,...
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....
In this exercise, you create an application that displays the capital of the state whose name is selected in a combo box. Create an application, using the following names for the solution and...
In this exercise, you learn how to specify that one or more arguments are optional in a Call statement. Open the VB2015\Chap07\Optional Solution\Optional Solution (Optional Solution.sln) file. a....
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...
In this exercise, you modify the Savings Account application from Exercise 13. Use Windows to make a copy of the Savings Solution-Function folder. Rename the copy Savings Solution-Sub. Also change...
Create an application, using the following names for the solution and project, respectively: Cable Direct Solution and Cable Direct Project. Save the application in the VB2015\Chap07 folder. Create...
In this exercise, you modify the Donut Shoppe application from Exercise 7. Use Windows to make a copy of the Donut Solution folder. Rename the copy Modified Donut Solution. Open the Donut Solution...
Visual Basic provides the Mid statement for replacing a specified number of characters in a string with another string. The statements syntax is Mid(targetString, start [, count]) =...
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...
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...
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...
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...
Explain the difference between using a computer program and programming a computer.
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...
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 , , ,,...
Fill in the blanks in each of the following: a. Each class declaration that begins with keyword must be stored in a file that has exactly the same name as the class and ends with the .java filename...
What does the following program print? public class Mystery2 { public static void main(String[] args) { int count = 1; while (count
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
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...
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...
Fill in the blanks in each of the following statements: a. A method is invoked with a(n) . b. A variable known only within the method in which its declared is called a(n) . c. The __________...
Fill in the blanks in each of the following statements: a. A(n) imports all static members of a class. b. String class static method is similar to method System.out.printf, but re- turns a formatted...
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
State whether each of the following is true or false. If false, explain why: a) In general, a nodes size should be defined explicitly. b) A nodes position should be defined relative to its parent...
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...
Fill in the blanks in each of the following statements: a. A self- class is used to form dynamic data structures that can grow and shrink at execution time. b. A(n) is a constrained version of a...
Credit card companies typically assign a special digit, called a check digit, to the end of each customers credit card number. The check digit allows companies to verify that the credit card number...
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...
Open the VB2015\Chap08\Shipping Solution\Shipping Solution (Shipping Solution.sln) file. The interface provides a text box for entering a shipping code, which should consist of two numbers followed...
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...
In this exercise, you modify the Norbert Pool & Spa Depot application from Exercise 9. Use Windows to make a copy of the Norbert Solution-Introductory folder. Rename the copy Norbert...
When a device interrupt occurs, how does the processor determine which device issued the interrupt?
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
A complex number is a number in the form a + bi, where a and b are real numbers and i is 2-1. The numbers a and b are known as the real part and imaginary part of the complex number, respectively....
Now that the No Customer Escapes project team has been formed and a plan has been developed for distributing project information, Jim can begin working on the projects scope statement, workbook, and...
Define the Circle2D class that contains: Two double data fields named x and y that specify the center of the circle with getter methods. A data field radius with a getter method. A no-arg...
Define the Triangle2D class that contains: Three points named p1, p2, and p3 of the type MyPoint with getter and setter methods. MyPoint is defined in Programming Exercise 10.4. A no-arg...
Rewrite the Course class in Listing 10.6 to add a clone method to perform a deep copy on the students field. Listing 10.6 - Course.java public class Course i private String courseNane: private string...
The 24-point card game is to pick any four cards from 52 cards, as shown in Figure 20.19. Note the Jokers are excluded. Each card represents a number. An Ace, King, Queen, and Jack represent 1, 13,...
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...
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...
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.
List the various cases where use of a NULL value would be appropriate.
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?
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...
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?
Rewrite Listing 16.13, ImageAudioAnimation.java, to use the resource bundle to retrieve image and audio files. (Hint: When a new country is selected, set an appropriate locale for it. Have your...
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.
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...
Projectile flight. Suppose a cannonball is propelled straight into the air with a starting velocity v 0 . Any calculus book will state that the position of the ball after t seconds where g = 9.81 m/s...
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...
Discuss the naming conventions used for ER schema diagrams.
Add a % (remainder) operator to the expression calculator of Section 15.6.3. package collections; import java.util.Scanner; import java.util.Stack; public class ExpressionCalculator { public static...
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)...
Resonant circuits are used to select a signal (e.g., a radio station or TV channel) from among other competing signals. Resonant circuits are characterized by the frequency response shown in the...
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...
The figure below shows a frequently used electric circuit called a voltage divider. The input to the circuit is the voltage vi. The output is the voltage vo. The output of a voltage divider is...
Describe the mismatch between processor and disk technologies.
The next program is an example of poor programming practice. It is based on an actual program that was used to control the display of a moving object. The main consideration at that time was speeding...
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...
A computer operating system (OS) uses paging for memory management. In paging: Main memory is divided into equal-size blocks, called page frames Each process that is executed is divided into blocks...
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...
Identify someone who manages an information systems project in an organization. Describe to him or her each of the skills and activities listed in Table 3-1. Determine which items he or she is...