Top Selling Computer science Questions

The algorithm shown in Figure 1-14 should calculate and print the gross pay for five workers; however, some of the instructions are missing from the algorithm. Complete the algorithm. If an employee... Snarled program logic is called _____________ code. a. Snake b. Spaghetti c. Linguini d. Gnarly In a selection structure, the structure-controlling condition is______________. a. Tested once at the beginning of the structure b. Tested once at the end of the structure c. Tested repeatedly until... 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... In Chapter 2, you learned that many programming languages allow you to generate a random number between 1 and a limiting value named limit by using a statement similar to randomNumber =... The structure that allows you to write one set of instructions that operates on multiple, separate sets of data is the _______________. a. Sequence b. Loop c. Selection d. Case The loop that frequently appears in a programs mainline logic _______________. a. Always depends on whether a variable equals 0 b. Is an example of an infinite loop c. Is an unstructured loop d.... Which of the following is not a step that must occur with every correctly working loop? a. Initialize a loop control variable before the loop starts. b. Compare the loop control value to a sentinel... A counter keeps track of _______________. a. The number of times an event has occurred b. The number of machine cycles required by a segment of a program c. The number of loop structures within a... Adding 1 to a variable is also called _______________ it. a. Digesting b. Resetting c. Decrementing d. Incrementing Which of the following is a definite loop? a. A loop that executes as long as a user continues to enter valid data b. A loop that executes 1,000 times c. Both of the above d. None of the above Which of the following is an indefinite loop? a. A loop that executes exactly 10 times b. A loop that follows a prompt that asks a user how many repetitions to make and uses the value to control the... Most programmers use a for loop _______________. a. For every loop they write b. When they know the exact number of times a loop will repeat c. When a loop must repeat many times d. When a loop will... Typically, the value added to a counter variable is _______________. a. 0 b. 1 c. The same for each iteration d. Different in each iteration After an accumulator or counter variable is displayed at the end of a program, it is best to _______________. a. Delete the variable from the program b. reset the variable to 0 c. Subtract 1 from the... When you _______________, you make sure data items are the correct type and fall within the correct range. a. Validate data b. Employ offensive programming c. Use object orientation d. Count loop... A variable might hold an incorrect value even when it is _______________. a. The correct data type b. Within a required range c. A constant coded by the programmer d. All of the above A subscript is a(n) _________. a. Element in an array b. Alternate name for an array c. Number that represents the highest value stored within an array d. Number that indicates the position of an... Each element in an array must have the same _______as the others. a. Data type b. Subscript c. Value d. Memory location Suppose that you want to write a program that inputs customer data including name, zipCode, balance, and regionNum. At the end of the program, a summary of the number of customers in each of 12 sales... Filling an array with values during a programs execution is known as________ the array. a. Executing b. Colonizing c. Populating d. Declaring Suppose that an instructor assigns different letter grades based on points earned on a 10-point quiz, and that all scores have been verified to be between 0 and 10 inclusive. Also suppose that four... When you use a subscript value that is negative or higher than the number of elements in an array, __________. a. Execution of the program stops and an error message is issued b. A value in a memory... In every array, a subscript is out of bounds when it is ______________. a. Negative b. 0 c. 1 d. 999 You can access every element of an array using a ______________. a. While loop b. For loop c. Either of the above d. None of the above a. Daily Life Magazine wants an analysis of the demographic characteristics of its readers. The Marketing department has collected reader survey records containing the age, gender, marital status,... The Curl Up and Dye Beauty Salon maintains a master file that contains a record for each of its clients. Fields in the master file include the clients ID number, first name, last name, and total... 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... a. Plan the logic for an insurance company program to determine policy premiums. The program continuously prompts the user for an insurance policy number. When the user enters an appropriate sentinel... Create the logic for a program that prompts the user for numeric values for a month, day, and year. Then pass the three variables to the following methods: a. A method that displays the date with... In the Game Zone sections of Chapters 6 and 8, you designed the logic for a quiz that contains questions about a topic of your choice. Now, modify the program so it contains an array of five... A class diagram ________. a. Provides an overview of a classs data and methods b. Provides method implementation details c. Is never used by nonprogrammers because it is too technical d. All of the... Which of the following is the most likely scenario for a specific class? a. Its data is private and its methods are public. b. Its data is public and its methods are private. c. Its data and methods... 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.... Complete the following tasks: a. Create a class named Meal that includes a string variable for the meals description, an array of strings that holds up to five of the Meals components (for example,... 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... Show (as circles-and-arrows diagrams) the finite automata for Exercise 2.1. Data from Exercise 2.1: Write regular expressions to capture the following. (a) Strings in C. These are delimited by double... 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. Consider the following counter-controlled loop: What is the name of the counter variable? Give the values of the initial value, the increment, and the limiting value. Declare K As Integer For (K =... 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 Define a new class named BSTWithHeight that extends BST with the following method: /** Return the height of this binary tree */ public int height() Use... 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... 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? 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... 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:... Contact three people at your school who use information systems. List their positions, the information they need, the systems they use, and the business functions they perform. 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? 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,... Map the BANK ER schema of Exercise 3.23 (shown in Figure 3.21) into a relational schema. Specify all primary keys and foreign keys. Repeat for the AIRLINE schema (Figure 3.20) of Exercise 3.19 and... 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... Design the wireframes and storyboard, interactivity diagram, object dictionary, and any necessary scripts for an interactive program for customers of the Dharma Day Spa. Allow customers the option of... 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. Design a database to keep track of information for an art museum. Assume that the following requirements were collected: The museum has a collection of ART_OBJECTS. Each ART_OBJECT has a unique... 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 = $; 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... 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 =... In Example 9.22 we merged states D and H to implement the FSM in Figure 9.82. An alternative was to merge states B and H, according to the merger diagram in Figure 9.83. Derive an implementation... 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... 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... 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)... 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... (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... Design a double pipe heat exchanger to cool a flow of liquid benzene from 85F to 60F. The mass flow rate of the benzene is 12,500 lbm/h. City water at 50F is available to provide the required... 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,... For a direct-mapped cache design with a 32-bit address, the following bits of the address are used to access the cache. 1. What is the cache block size (in words)? 2. How many entries does the cache... 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...
Showing 1500 - 1600 of 5000