### Data structure describing single entity or event

Which of the following data structures is a group of data elements that usually describes a single entity or event? a. Array b. Index c. linked list d. record

Explore BrainMass

- Anthropology
- Art, Music, and Creative Writing
- Biology
- Business
- Chemistry
- Computer Science
- Drama, Film, and Mass Communication
- Earth Sciences
- Economics
- Education
- Engineering
- English Language and Literature
- Gender Studies
- Health Sciences
- History
- International Development
- Languages
- Law
- Mathematics
- Philosophy
- Physics
- Political Science
- Psychology
- Religious Studies
- Social Work
- Sociology
- Statistics

Which of the following data structures is a group of data elements that usually describes a single entity or event? a. Array b. Index c. linked list d. record

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.

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

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.

List and describe three types of software defects that inspection can detect.

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

Write a program in Java which defines two unconstrained arrays of user defined length n, that contain n Random numbers each and which outputs the addition of pairs of elements. For example, given {1, 2, 3} and {4, 5, 6} the output would be {5, 7, 9}. Please use well commented code. The program must consist of at least 2 files.

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)

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 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

Describe a method for storing three-dimensional homogeneous arrays. What addressing formula would be used to locate the entry in the ith plane, jth row, and the kth column?

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

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.

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

Write the definition of a method, isReverse , whose two parameters are arrays of integers of equal size. The method returns true if and only if one array is the reverse of the other. ("Reverse" here means same elements but in reverse order.) So, suppose you had two int arrays, forward and backward, each with 4 elements. N

Multi-dimensional arrays could cost a lot of memory. How much memory (how many bytes) does it take to create an integer array of 3 dimensions, with each dimension having 1000 elements (i.e. int myHugeArrays[1000] [1000] [1000])? Explain your answer.

The prices for ten automobiles are as follows: 0 $17,450 1 $19,995 2 $26,500 3 $25,999 4 $10,400 5 $18,885 6 $11,700 7 $14,440 8

Write a big-inteter calculator program that allows the user to enter two large integers and the operation to be performed and that calls the appropriate function to carry out the designated operation. **NOTE: I need the solution in C++ Code.

Specification Implement the Banker's algorithm described in Section 8.5.3 using C/C++. Your program should ... 1) Prompt user to enter the size of matrix n and m. Your program should accept any n x m matrix and m vectors where n and m are positive integer less than 10. 2) Read in Allocation, Max, and Available from all

Explain what a one-dimensional array and its components are. Explain why arrays are useful, and how they are created within Visual Basic .NET. Finally, explain how two-dimensional arrays are different than one-dimensional arrays. Thank you

What is the difference between sequential file access, random file access, and binary file access? For each of the three types, give an example of an application where the use of one type is better than the other two types.

A company has a product line that includes five items that sell for $100, $75, $120, $150, and $35. There are four salespersons working for this company, and the following report is for a given week: Salesperson Item Number 1 2

A certain professor has a file containing a table of student grades, where the first line of the file contains the number of students and the number of scores in the table; each row of the table represents the exam scores of a given student and each column represents the scores on a given exam. The maximum possible score on eac

If x denotes the mean of a sequence of numbers x1, x2,.....xn, the variance is the average of the squares of the deviations of the numbers from the mean, and the standard deviation is the square root of the variance. Write functions to calculate the mean, variance, and standard deviation of the values stored in an array and a d

The Rinky Dooflingy Company manufactures different kinds of doofingies, each identified b a product number. Write a program that reads product number and prices and stores these values in two arrays, number and price;number[0] and price[0] are the product number and unit price for the first item, number[1] and price[1] aare the

Write a big-inteter calculator program that allows the user to enter two large integers and the operation to be performed and that calls the appropriate function to carry out the designated operation.

Shortest Prefixes Input: Prefix .in Output: Prefix .out A prefix of a string is a substring string at the beginning of the given string. The prefixes of "carbon" are: "c", "ca", car", "carb", "carbo", and "carbon". Note that the empty string is not considered a prefix in this problem, but every non-empty string is conside

This program has 2 parts. The purpose is to design a payroll program that uses array of objects to store the employees' information. Assume that the minimum wage is $6.0, and standard work load is 40 hours per week. Declare them as named constants with global scope. (See attachment for full question)

Suppose that the information content of a packet is the bit pattern 1111000010100101 and an even parity is being used a. What would be the checksum field in a single parity bit scheme? b. What would be the value of the checksum field b for the case of a two-dimensional parity scheme? Your answer should be such that a minim

Show how to modify the Bellman-Ford algorithm to find and print a negative weight cycle (reachable from the source, s) in a weighted directed graph G if one exists. If there is no negative weight cycle, your algorithm should print out "no negative weight cycle reachable from". If there is a negative weight cycle reachable from