Explore BrainMass


Entry in a Homogeneous Array

Suppose that a homogeneous 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?

Using Loops and Pseudocode

Use a loop and an array to read in 10 integers from the keyboard. Then display them. Then create a flowchart for the above. Please also provide the Pseudocode.

Strings as a kind of character array or primitive type

The two most important design issues that are specific to character string types are the following: Should strings be simply a special kind of character array or a primitive type? If you were to design your own programming language, which approach would you take and why? Elaborate on the reasons based on real life programming sc

A Program that Automatically Generates Numbers

For this assignment, you will create a program that automatically generates numbers between a range provided by the user and stores them in an array. Your program will then calculate the number of page faults using replacement algorithms and provide the average frame replacements for each. STEPS 1. Write a program using C+

Program Test Procedures

Generate a set of test inputs and expected results for the Currency Conversion program. Pseudocode: Input: Arrays of Employee Name and Salary [1..N] Output: MeanSalary, nSalaryAbove, nSalaryBelow Uses: BubbleSort Declaration: Real TotalSalary, MeanSalary Integer nSalaryAbove, nSalaryBelow, Count, i Process Begin

Pickup 10 Numbers and Store Array Using Function fillAr

Using c-language programming (not C++): Write a complete program to do the following specification: 1. Pickup 10 numbers and store it in an array using function fillArray. 2. Print the content of array with the message "Array not sorted" using printArray function. 3. Copy array a into array b using copyArray(a,b,10) fun

Document Java Program

Examine the program. Write a Word or text document detailing how the binary search code works. text document ok

Methods, Constructors, Loops and Arrays Demonstrated in Java

Write an interactive Java program that illustrates the use of methods, constructors, loops and arrays. Your Program will do the following: 1. Ask the user for a String input of letters, i.e., Ohio; John Doe; AnyTown. Notice that strings with spaces are allowed. 2. Offer your user two choices: 1. Determine the

Java and Reversal Method

I have to write a Java program method named reversal that returns a new array that is a reversal of the original array. Use [5.0, 4.4, 1.9, 2.9, 3.4, 3.5] to test the method. Also, the reversal method is to send the minimum item of the array. Output Sample: Original Array is: 5.0 4.4 1.9 2.9 3.4 3.5 The Reversal is: 3.

Writing Syntax

1. Write the syntax (one line) to declare an int array with 7 values which are all 10. 2. Write the syntax using a loop to print out every odd value from the array above.

Array Syntax, Initialization, and Headers

1. Give an example of an array that is initialized during declaration: 2. Write a method header that accepts an array as a parameter: 3. What is the result of the syntax: double a[ ], b;

Default Initialization Values

What is the default initialization value for a integer array? What is the default initialization value for a character array? Which array types could hold object references?

Recursive Algorithm for Given Integer Array A

Implement two recursive algorithms to solve the following problems: Problem 1: Implement a recursive algorithm to find the maximum element of given integer array A. Count the number of comparisons while finding the maximum element and print input size, maximum element, and number of comparisons. Example: integer array A=[1

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

JAVA code

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

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

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.

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

Java Bubble Sort

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)