Explore BrainMass


When one is first taught what an array is, it is often described as a list of values, but in truth, they are much more. For one thing, arrays can be in higher dimensions that just a 1D list, but more important is the vast range of operations made possible by arrays, and the even wider applications of those.

Array programming aims to take advantage of those opportunities. The idea behind it is to enable generalized operations on scalars to apply transparently to vectors, higher dimensional arrays and matrices. Applying operations simultaneously to an entire set of values instead of explicitly iterating through individual scalar operations in a loop make it possible to work at a higher level. This way, one is able to find and manipulate macro properties of data where individual items are adjacent or otherwise similar in order to group data and handle a huge amount of it uniformly and efficiently. This ideology is very unlike object-orientated approaches which focus on breaking complex programs into their individual parts - here, we aim to craft those parts together and work with the large clumps of data that result.

Along with BASIC and MATLAB, Ada is a well-known language which supports array programming syntax, named after Ada Lovelace the first programmer.

Many array programming languages are remarkably concise for array operations if compared with equivalent code in a non-array-orientated language; what is a one-liner in the former page require pages of Java code. This very high-level representation is well suited to implicit parallelization - not to be confused with parallel processing! Array processing is distinct from that process of splitting complex problems into smaller ones to be solved by multiple processing. Here, one physical processor handles the operations on the group of elements instead. This is an active area of research and improvement as well.

You are working with a travel agent to support a conference in Las Vegas. Attendees must register for the conference with a valid email address, name and valid phone number. Every conference registration has an attendee, and a number of sessions in which he/she chooses to participate. Additionally, registrations are either with or without travel.

You are working with a travel agent to support a conference in Las Vegas. Attendees must register for the conference with a valid email address (see below), name and valid phone number (see below). Every conference registration has an attendee, and a number of sessions in which he/she chooses to participate. Additionally, regist

Evaluate Bit Strings

Please help answer the following questions. How many bit strings of length 6? How many bit strings of length 6 is there that begin with 0 or end with a 1? How many bit strings of length 8 are there which contain exactly 3 ones? How many bit strings of length 8 are palindromes?

Java Searching an Array for Exact Match Using Loops

The program uses an array that contains valid names for 10 cities in the Illinois. You ask the user of the program to enter a city name; your program then searches the array for that city name. If it is not found, the program should print a message that informs the user that the city name is not found in the list of valid cit

Java - Magic Square

See the attached file. Magic squares. An n × n matrix that is filled with the numbers 1, 2, 3, ... , n2 is a magic square if the sum of the elements in each row, in each column, and in the two diagonals is the same value. For example, Write a program that reads in n2 values from the keyboard and tests whether they form a

Struct Villian and copyVillian function

Suppose I have declared the following struct: struct Villian { int wit; int stealth; int slainCount; int slainCap; string* victimsSlain; }; Also assume the existence of a function copyVillian (as declared below) that takes two Villian params, one called orig and the other called copycat, and mak

Function called copyVillian that takes two Villian parameters

Please add comments using //. Suppose I have declared the following struct: struct Villian { int wit; int stealth; int slainCount; int slainCap; string* victimsSlain; }; 1. Declare a new Villian called sharpay who has a wit of 24, a stealth of 16, and who has currently claimed three victims: Chad, T

Java program asks the user how many automobiles are described.

Write a program that asks the user how many automobiles are to be described, and for each automobile it inputs the user's selection of make and color. Then it outputs color and make. Although you could do this easily using a simple procedural program, do it by using a main method in class AutomobileDriver to instantiate an objec


JAVA. Write a class representing a line item in a shopping cart: The characteristics of this class are the name of the product, the cost per unit, and the number of items. This class is named LineItem.Provide a constructor that takes 3 arguments, and initializes the corresponding instance variables. Provide the assessors to

Java Coffee Application Written

Write an application that prompts the user to make a choice for a Coffee cup size, S for Small, T for Tall, G for Grande and V for Venti â?" the prices of the cup sizes will be stored in a parallel double array as $2.00, $2.50, $3.25, and $4.50 respectively. Allow the user to choose if they would like to add a flavor to the

RAID 0, 1, and 5

What is Redundant Array of Independent Disks (RAID) 0, 1, and 5?

Using C Structure to store contact information

Write a C program that prompts the user to enter some information about up to ten individuals. It should store this information in a structure. The program should obtain the information from the structure, and output it as shown in attachment. Please see the attachment for complete information on the problem.

JAVA Arrays Modified Mortgage Calculator

Modify the Mortgage Calculator Design to calculate and display the payment amount for each of three loans: a 7 year at 5.35% b 15 year at 5.5% c 30 year at 5.75% The program does not need to print an amortization table for the loans, just the payment amount. The payment amount needs to be two decimal points. The loan data

Few questions about functions and arrays in shell scripting

2.Which of the following commands is used to create an array? a.create b.declare c.function d.source 3.You use the ______________ command to call a function library file. a.create b.declare c.function d.source 4.Which of the following commands is used to display all variables? a.create b.typeset c.function d

Using Loops and String Arrays in Excel

I have an assignment due and am having issues with the first part (which is needed to do all of the other parts). I have the following VBA code written: Private Sub DisplayData(strArray() As String) Dim intFriend As Integer For intFriend = 1 To mintNumFriends Cells(intFriend + 1, 1).Value = strArray(1) Cells(intFri

Branch Hazard

One type of pipeline hazard that can occur is a branch hazard. a. Describe what a branch hazard is, and what causes a branch hazard. b. Give a relevant example using the MIPS instruction set architecture. Compare and contrast how the code will proceed it the branch is taken, vs if the branch is not taken, and explain how

Analyzing Age and Weight

Analyzing Age and Weight In this project you will combine the use of arrays and objects to perform some analysis of the age and weight relationships among a group of people. You have been contracted to write a program into which data about people, including their ages and weights, will be entered. As output the program will p

**Java** Calculating Payroll

Company weekly payroll. The input will be a list of hours worked by employees. The output will be the list of amounts owed to each employee plus a total sum of the amounts owed. Use two methods that work with arrays that contain the payroll data. The first method, which will be called getPayrollData(), will be called from mai

Creating Classes and Inheretence usage

Create an Employee class for a basic payroll program to compute the net pay salary of hourly based employees. Your program should also find the average net pay for a small company. To define the class, include the appropriate data members, member functions, and access modifiers. For simplicity, use a constant tax rate of 30% to

Random Walk Simulation C program

Need C program for problem: Random Walk Simulation A two-dimensional array (N X M) should be used to represent the number of times the bug reached each tile on the floor. All cells of this array should be initialized to zero. The position of the bug on the floor is represented by the coordinates (i-bug, j-bug). The eight

Calculating Occurrences: Java Programming

Need some assistance modifying attached code to meet/produce the following requirements/output: Write a program that reads numbers from the keyboard into an array of type int[]. Assume that there will be 50 or fewer entries in the array. The program should allow any number of numbers to be entered, up to 50 numbers. The outpu

Computer Science: Flowchart Creation

The problem below is an example of a problem I'm studying to gain additional knowledge in programming. Please provide explanation along with the Flow chart. ------------------------------------------------------------------ Create a flowchart for this program that would produce a count of the number of residents residing

Network Disaster recovery plan

How would you approach a backup and administration plan for the hypothetical situation described below. Include any network administration systems that should be installed for remote access in the event of a network emergency. This is basically a disaster recovery plan. Hypothetical situation: ABC Corporation performs sensit

Java Problem Implementing Cloneable and Comparable Interfaces

I'm supposed to write a class Octagon that extends the class Circ and implements Comparable (compare the object's area) and Cloneable interfaces. The octagons sides are all of equal size. The area can be computed according to the formula: area = (2 + 4/sqrt(2)) * side * side. Write a test program that creates an array of sha