Does the fact Spouse(George, Laura) follow from the facts Jim George and Spouse (Jim, Laura)? If so, give a proof; if not, supply additional axioms as needed. What happens if we use Spouse as a...
Define an ontology in first-order logic for tic-tac-toe. The ontology should contain situations, actions, squares, players, marks (X, O, or blank), and the notion of winning, losing, or drawing a...
Which of the following are correct? a. False True. b. True False. c. (A B) (A B). d. A B A B. e. A B A B. f. (A B) C (A C) (B C). g. (C (A B)) ((A C) (B C)). h. (A B) (C D ...
These questions concern concern issues with substitution and Skolemization. a. Given the premise x y P(x, y), it is not valid to conclude that q P(q, q). Give an example of a predicate P where the...
Develop a representational system for reasoning about windows in a window-based computer interface. In particular, your representation should be able to describe: The state of a window: minimized,...
We have a bag of three biased coins a, b, and c with probabilities of coming up heads of 20%, 60%, and 80%, respectively. One coin is drawn randomly from the bag (with equal likelihood of drawing...
Under what circumstances can PopularShows be used for inserts and modifications?
Translate the following C code to MIPS. Assume that the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address of the arrays A...
What is 5ED4 - 07A4 when these values represent unsigned 16-bit hexadecimal numbers? The result should be written in hexadecimal. Show your work.
Rewrite the loop from Exercise 2.29 to reduce the number of MIPS instructions executed. Exercise 2.29 Translate the following loop into C. Assume that the C-level integer i is held in register $t1,...
All method declarations contain _____________. a. Arguments b. One or more explicitly named access specifiers c. Parentheses d. The keyword static
When a block exists within another block, the blocks are _____________. a. Structured b. Illegal c. Sheltered d. Nested
Nonambiguous, overloaded methods must have the same _____________. a. Types of parameters b. Number of parameters c. Parameter names d. Name
A constructor _____________ parameters. a. Can receive b. Cannot receive c. Must receive d. Can receive a maximum of 10
If you create a class that contains one method, and instantiate two objects, you usually store _____________ for use with the objects. a. One copy of the method b. Two copies of the method c. Two...
Which of the following statements determines the square root of a number and assigns it to the variable s? a. s = sqrt(number); b. s = Math.sqrt(number); c. number = sqrt(s); d. number = Math.sqrt(s);
A LocalDate object _____________. a. Can be displayed as a String b. Contains static fields with data such as the current year c. Is created using a public default constructor d. All of the above
Which of the following expressions correctly returns an integer that represents the month of a LocalDate object named hireDate? a. getMonth(hireDate) b. getMonthValue(hireDate) c....
The logical structure in which one instruction occurs after another with no branching is a ____________. a. Sequence b. Selection c. Loop d. Case
Which of the following is not a type of if statement? a. Single-alternative b. Dual-alternative c. Reverse d. Nested
What is the output of the following code segment? t = 7; if(t > 7) { System.out.print("AAA"); System.out.print("BBB"); } a. AAA b. BBB c. AAABBB d. Nothing
Assuming a variable w has been assigned the value 15, what does the following statement do? w == 15 ? x = 2 : x = 0; a. Assigns 15 to w b. Assigns 2 to x c. Assigns 0 to x d. Nothing
What does the following statement output? for(a = 0; a < 5; ++a) System.out.print(a + " "); a. 0 0 0 0 0 b. 0 1 2 3 4 c. 0 1 2 3 4 5 d. Nothing
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 DebugSix1.java as FixDebugSix1.java....
If String myFriend = new String("Ginny");, which of the following has the value 1? a. myFriend.compareTo("Gabby"); b. myFriend.compareTo("Gabriella"); c. myFriend.compareTo("Ghazala"); d....
The String class replace() method replaces ____________. a. A String with a character b. One String with another String c. One character in a String with another character d. Every occurrence of a...
The difference between int and Integer is ____________. a. Int is a primitive type; Integer is a class b. Int is a class; Integer is a primitive type c. Nonexistent; both are primitive types d....
You created a class named Game that included two Team objects that held data about teams participating in a game. Modify the Game class to set the game time to the message Game cancelled! if the two...
When you declare an array, ____________. a. You always reserve memory for it in the same statement b.You might reserve memory for it in the same statement c. You cannot reserve memory for it in the...
You reserve memory locations for an array when you ____________. a. Declare the array name b. Use the keyword mem c. Use the keyword new d. Use the keyword size
Array names represent ____________. a. References b. Values c. Functions d. Allusions
When you initialize an array by giving it values upon creation, you ____________. a. Do not explicitly give the array a size b. Also must give the array a size explicitly c. Must make all the values...
When you use a bubble sort to perform an ascending sort, after the first pass through an array the smallest value is ____________. a. At the beginning of the list b. In the middle of the list c. At...
You created a class named Purchase. Each Purchase contains an invoice number, amount of sale, amount of sales tax, and several methods. Add get methods for the invoice number and sale amount fields...
Create a class named Rock that acts as a superclass for rock samples collected and catalogued by a natural history museum. The Rock class contains fields for a number of samples, a description of the...
Which of the following statements is true? a. Exceptions are more serious than Errors. b. Errors are more serious than Exceptions. c. Errors and Exceptions are different but equally serious. d....
The method that ends the current application and returns control to the operating system is ____________. a. System.exit() b. System.done() c. System.end() d. System.abort()
If you include three statements in a try block and follow the block with three Catch blocks, and the second statement in the try block throws an exception, Then___________. A. The first catch block...
The memory location where the computer stores the list of method locations to which the system must return is known as the ____________. A. Registry B. Archive C. Chronicle D. Call stack
A(n) ____________ is a statement used in testing programs that should be true; if it is not true, an exception is thrown. A. Verification b. Throwable c. Assertion d. Declaration
The path class getfilename() method returns ____________. A. The string representation of a path B. An absolute path C. The first item in a paths list of name elements D. The last item in a paths...
A buffer ____________. A. Holds bytes that are scheduled for input or output B. Deteriorates program performance C. Cannot be flushed in java D. All of the above are true.
A file channel ____________. A. Can be read from B. Can be written to C. Is seekable D. All of the above are true.
Suppose that you have declared a ButtonGroup named twoOptions and added two JCheckBoxes named box1 and box2 to it. Which box is selected after the following statements execute?...
a. Write an application that instantiates a JFrame that contains a JButton. Disable the JButton after the user clicks it. Save the file as JFrameDisableButton.java. b. Modify the JFrameDisableButton...
In Java, you can declare an array of 12 elements and initialize ____________. a. Only the first one b. All of them c. Both of these are true. d. Neither of these is true.
In which of the following situations would setting up parallel arrays be most useful? a. You need to look up an employees ID number to find the employees last name. b. You need to calculate interest...
When you pass an array element to a method, the method receives ____________. a. A copy of the array b. The address of the array c. A copy of the value in the element d. The address of the element
If a method should return an array to its calling method, ____________. a. The methods return type must match its parameter type b. The return type in the method header is preceded by an ampersand c....
Which of the following statements is true? a. JavaFX cannot be used with Swing projects. b. JavaFX uses HTML for design layout. c. JavaFX can be used to develop applications for the desktop and the...
Using your solution to problem 1, do the following: a. Add the view layer classes and the data access classes to your diagram. You may do this with two separate diagrams to make them easier to work...
Which of the following statements is true? a. The Inspector panel contains the Controller, Layout, and Code sections. b. The Code section allows you to manage event handling actions for controls. c....
Which of the following statements is true. Javafx ____________. A. Is difficult to use B. Cannot incorporate video, sound, or web content C. Separates the ui from the application logic D. Does not...
Minimize each of the following expressions for F using a K-map in sums-of product form: (a) F(W, X, Y, Z) = WXYZ + WYZ (b) F = A B C D + ACD + ABCD (c) F = (A + B + C + D)(A + B + C + D)(A + B + C +...
Using your solution to problem 12, do the following: a. Add the view layer classes and the data access classes to your diagram. b. Develop a package diagram showing a three layer solution with view...
Open the VB2017\Chap01\FixIt Solution\FixIt Solution.sln file. If necessary, open the designer window. The interface contains a picture box, two buttons, and a label control that displays the price...
Create an application that calculates and displays the percentage of the total sales made by each of the following three salespeople: Jim, Karen, and Martin. Before creating your Planning Chart,...
In this exercise, you modify the application created in Exercise 2. Use Windows to make a copy of the Hales Solution folder. Rename the copy Hales Solution-Select Case. Open the Hales Solution.sln...
How many times will the string literal Hi appear in the lblMsg control? Dim intCount As Integer Do lblMsg.Text = lblMsg.Text & "Hi" & ControlChars.NewLine intCount += 1 Loop While intCount > 4 A....
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...
Which of the following statements selects the fourth item in the lstNames control? a. lstNames.SelectIndex = 3 b. lstNames.SelectIndex = 4 c. lstNames.SelectedIndex = 3 d. lstNames.SelectedItem = 4
Minimize each of the following functions for f using a K-map and dont care conditions, d. (a) f(A, B, C) = m(1, 2, 4, 7) d(A, B, C) = m(5, 6) (b) f(X, Y, Z) = m(2, 6) d(X, Y, Z) = m(0, 1, 3, 4,...
In this exercise, you create an application for Discount Warehouse. Create a Windows Forms application. Use the following names for the project and solution, respectively: Discount Project and...
Show that the Boolean function, f = A B AB between two variables, A and B, can be implemented using a single two-input gate.
Simplify each of the following functions for F using a K-map. Draw a logic diagram for each using NAND-only and NOR-only gates. (a) F(W, X, Y, Z) = m(0, 2, 4, 8, 12) (b) F(W, X, Y, Z) = m(0, 2, 4,...
Find function F for the following circuit: Do
Design a combinational circuit that accepts a two-bit unsigned number, A and B such that the output, F = A plus B. Note that AB = 11 2 will never occur. Draw a schematic using logic gates. Show all...
Which of the following is false? a. A function returns only one value to the statement that invoked it. b. A Sub procedure can accept only one item of data passed to it. c. The parameterList in a...
What are the items that appear within parentheses in a procedure header called? A. Arguments B. Parameters C. Passers D. None of the above.
Which of the following statements invokes the GetArea Sub procedure, passing it two variables by value? a. GetArea(dblLength, dblWidth) As Double b. GetArea(ByVal dblLength, ByVal dblWidth) c....
Which of the following is a valid header for a procedure that receives an integer followed by a number with a decimal place? a. Private Sub GetFee(intBase As Value, decRate As Value) b. Private Sub...
Which of the following is a valid header for a procedure that receives the address of a Decimal variable followed by an integer? a. Private Sub GetFee(ByVal decX As Decimal, ByAdd intY As Integer) b....
Design a combinational circuit using full adders to multiply a 4-bit unsigned number by 2. Draw a logic diagram using the block diagram of a full adder as the building block.
Draw a logic diagram using a 74138 decoder and a minimum number of external gates to implement the following: F0(A, B, C)= m(1,3,4), F1(A, B, C)= m(0,2,4,7), F2(A, B, C)= m(0,1,3,5,6), F3(A, B, C)=...
Design: (a) A 16-bit adder whose worst-case add-time is 10 using a 4-bit CLA as a building block. (b) The fastest 64-bit adder using a 4-bit CLA as the building block. Estimate the worst-case...
Write SQL queries to answer the following questions: a. Which students are enrolled in Database and Networking? (Use SectionNo for each class so you can determine the answer from the Registration...
Add minimum and maximum cardinality notation to each of the following figures, as appropriate: a. Figure 2-5 b. Figure 2-10a c. Figure 2-11b d. Figure 2-12 (all parts) e. Figure 2-13c f. Figure 2-14
How do you represent a 1:M unary relationship in a relational data model?
Table 4-5 shows a shipping manifest. Your assignment is as follows: a. Draw a relational schema and diagram the functional dependencies in the relation. b. In what normal form is this relation? c....
A sign extension unit extends a twos complement number from M to N (N > M) bits by copying the most significant bit of the input into the upper bits of the output. It receives an M-bit input A and...
In this problem, you will explore the design of a 32-bit prefix adder. (a) Sketch a schematic of your design. (b) Design the 32-bit prefix adder in an HDL. Simulate and test your adder to prove that...
The toggle (T) flip-flop has one input, CLK, and one output, Q. On each rising edge of CLK, Q toggles to the complement of its previous value. Draw a schematic for a T flip-flop using a D flip-flop...
Describe in words what the state machine in Figure 3.70 does. Using binary state encodings, complete a state transition table and output table for the FSM. Write Boolean equations for the next state...
You are designing an FSM to keep track of the mood of four students working in the digital design lab. Each students mood is either HAPPY (the circuit works), SAD (the circuit blew up), BUSY (working...
Write an HDL module that computes a four-input XOR function. The input is a 3:0 , and the output is y.
Write a self-checking testbench for Exercise 4.3. Create a test vector file containing all 16 test cases. Simulate the circuit and show that it works. Introduce an error in the test vector file and...
Sketch a schematic of the circuit described by the following HDL code. Simplify the schematic so that it shows a minimum number of gates. SystemVerilog VHDL module exerctsel (input 1ogt ca, b. c....
1. Provide an overview of the proposed system, including costs and benefits, with an explanation of the various cost-benefit types and categories. 2. Develop an economic feasibility analysis, using...
Consider the entries in Table 4.2 for the sawtooth and the triangular signals normalized in magnitude and period. Use their Fourier coefficients to obtain corresponding periodic signals that are...
What are the main security issues that New Century should address? Prepare a memo that lists the primary concerns and offers a specific recommendation for dealing with each issue. You implemented the...
Write a program that displays the area and perimeter of a rectangle with the width of 4.5 and height of 7.9 using the following formula: area = width height
The U.S. Census Bureau projects population based on the following assumptions: One birth every 7 seconds One death every 13 seconds One new immigrant every 45 seconds Write a program to display...
Write a program that prompts the user to enter the number of students and each students name and score, and finally displays the student with the highest score and the student with the second-highest...
Use nested loops that display the following patterns in four separate programs: Pattern B 12 3 4 5 6 2 3 4 5 123 4 Pattern D 1 2 3 4 5 6 12 3 4 5 123 4 Pattern A Pattern C 2 1 3 2 1 4 3 2 1 5 4 3 2 1...
The two roots of a quadratic equation ax 2 + bx + c = 0 can be obtained using the following formula: b 2 - 4ac is called the discriminant of the quadratic equation. If it is positive, the equation...
Write a program that prompts the user to enter the number of students, the students names, and their scores, and prints student names in decreasing order of their scores.
Revise Listing 3.4, ComputeAndInterpretBMI.java, to let the user enter weight, feet, and inches. For example, if a person is 5 feet and 10 inches, you will enter 5 for feet and 10 for inches. Here is...
Define a class named ComparableCircle that extends Circle and implements Comparable. Draw the UML diagram and implement the compareTo method to compare the circles on the basis of area. Write a test...
Write a program that prints the characters in the ASCII character table from ! to ~. Display ten characters per line. The ASCII table is shown in Appendix B. Characters are separated by exactly one...
Write a method that computes the commission, using the scheme in Programming Exercise 5.39 . The header of the method is as follows:public static double?computeCommission(double?salesAmount)Write a...