Explore BrainMass

Explore BrainMass

    Arrays

    BrainMass Solutions Available for Instant Download

    Program to Find the Room with the Largest Perimeter

    Write a program that prompts for the number of rooms in a house. Use the input, n, to declare an array of rectangles dynamically. In a loop, input the dimensions for the n rooms, and then output the total area of the house. Scan the array to identify the room with the largest perimeter, and output its dimensions. Specificatio

    A client/server system requires remote users to use a password to log onto the server. Describe a simple scheme that would thwart eavesdroppers from obtaining and/or spoofing the password.

    Q1 A client/server system requires remote users to use a password to log onto the server. Describe a simple scheme that would thwart eavesdroppers from obtaining and/or spoofing the password. A1. unknown Q2 Bob is concerned about the possibility of having his 100k byte file modified without his knowledge, so he calculate

    Writing a Program that Reads and Prints Arrays

    Write a program that reads a 5 x 5 two-dimensional array of integers and then prints the row sums and the column sums: Enter row 1: 8 3 9 0 10 Enter row 2: 3 5 17 1 1 Enter row 3: 2 8 6 23 1 Enter row 4: 15 7 3 2 9 Enter row 5: 6 14 2 6 0 Row Totals: Column Totals: You may either initialize this array with

    DRAM: Refresh Requests and Refresh Address Counter

    A microcomputer memory is built from 64K X 1 DRAM, with DRAM cell array organized into 256 rows. Each row needs to be refreshed at least once every 4 ms, strictly on a periodic basis. 1. Give time period between successive refresh requests. 2. How long a refresh address counter do we need?

    Performing Calculations on Rows and Columns of an Array

    Create an application that either sums or averages the rows or columns of a two-dimensional array depending on user choices. Use the following data for the array: 5 7 3 9 12 4 8 9 13 4 0 -1 -7 13 8 4 4 4 4 0 Create a menu bar with a File menu that includes a Perform Action comm

    JAVA Code Variable Names

    I need assistance in remarking the enclosed Java Code high-lighting, things like code layout, use of variable names, general readability and understandability.

    C program to calculate and display sales of a store

    ******************************************************************** Service Request: SR-kf-008 Change Request: 2 Requestor: Harvey Stephens Modify the C program so that the user inputs the purchase amount. Check the user's input for validity. Have the user select from a menu which store to use for the tax calculation

    Creating an application that multiplies columns

    The input must be done though text boxes. By default, the array must have the following values: 5, 2, 3 8, 32, 1 4, 9, 10 17, 15, 12 The application will multiply the columns of the matrix (e.g., 5 * 8 * 4 * 17 = 2720) and subtract the rows (e.g., 5 - 2 - 3 = 0). Display the results for the multiplication of all colu

    Design a queue ADT

    Design a queue abstract data type, including operations for enqueue, dequeue, and empty. I am not familiar with abstract data types.

    Please modify this program so the application can handle multiple items.

    Please modify this program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product.

    Information Systems and Design

    Questions 2-8 only require "yes" or "no." 1. If you have a program with a housekeep() module, a mainloop() module, and a finishup() module, when is the second input record usually read? 2. Is it ever correct to create a loop that cannot terminate? 3. Is it inefficient to place the calculation within the loop when a c

    Programming Problems

    Most programming languages do not allow you to ask two or more questions in a single comparison by using a logical And Operator Most programming languages allow you to ask two or more questions in a single comparison by using logical OR operator In an AND situation, first ask the question that is more likely to be true.

    Briefly discuss Arrays.

    Briefly discuss arrays. When would you use an array? Waht are the benefits? How are they created? What is a multidimensional array?

    Perform Calculations on Rows and Columns of an Array

    Create an application that either sums or averages the rows or columns of a two-dimensional array depending on user choices. Use the following data for the array: 5 7 3 9 12 4 8 9 13 4 0 -1 -7 13 8 4 4 4 4 0 Create a menu bar with a file menu that includes a Perform Action command and an E

    Write a program implements this sort

    Simple sort for (i=0;i<SIZE;++i> for (j=i+1;j<SIZE;++j) if (a[i]>a[j] swap(&a[i],&a[j]); then modify it so that all the elements of the array are printed sfter each pass of the outer loop 7 3 66 3 -5 22 -77 2

    elements of the array

    Edit this program which sorts a 10 element integer array using the bubble sort process. The elements of the array to be sorted must be entered by the user. No dupilcates are alowed. Input of non integer values and letters should be handled with a message and retry for input.

    Design a hashed file

    Design a hashed file of words that could be used as a spell checker. What would you use as a hash function? Would your choice of a hash function depend on the language from which the words are chosen? Why should such a file not be stored as a sequential file? (ALSO EXPLAIN IN DETAIL)

    Algorithm

    Quest: In English like pseudo-code, or structured English -- just to make sure everyone can read it; write an algorithm to determine if a string is a palindrome. A palindrome is a word or phrase that is spelled the same whether you are reading it forwards or backwards (ex. race car, Madam I'm Adam). Your algorithm should igno

    Suppose an array

    Suppose an array with 6 rows and 8 columns is stored in row major order starting at address 20 (base ten). If each entry in the array requires only one memory cell, what is the address of the entry in the third row and fourth column? What if each entry requires two memory cells? (See attached file for full problem descriptio

    Order-statistic tree (Augmenting Data Structures)

    Need help to show how to use an order-statistic tree to count the number of inversions in an array of size n in time O(n lg n). Note that we call a pair (i,j) an inversion if i < j, but key[i] > key[j]. Thus, an increasing sequence has no inversions. A decreasing list has the maximum number of inversions, n(n-1)/2. I beli

    Sorting an array of integers in linear time

    How can I sort an array of integers in O(n) time, where different integers may have different numbers of digits, but the total number of digits over ALL the integers in the array is n? My assumption is that radix sort is somehow involved.

    Arrays

    Step by step instructions Create an application that either sums or averages the rows or columns of a two-dimensional array depending on user choices. Use the following data for the array. 5 7 3 9 12 4 8 9 13 4 0 -1 -7 13 8 4 4 4 4 0

    Algorithm to find majority element

    Let A be an array of n elements. An element x is said to be a majority element in A if it occurs in A more than n/2 times. Assume that the only comparisons allowed between elements are tests of equality. Give an algorithm that uses no more than 2n comparisons to determine whether the array A contains a majority element and, i