Explore BrainMass


User Defined Functions

Write a value-returning function, isVowel, that returns the value true if a given character is a vowel and otherwise returns false. This is what I have so far with no luck compiling the program. Any help would be greatly appreciated. #include <iostream> using namespace std; char isVowel(); int main() { char c

Please complete the following

Within the zip folder you'll find a line in the "Process Action" section of code (Look near the very bottom) the line reads something like: MSGBOX(strDisplayResult) this needs to be changed to: 1) before displaying the results, add a question at the end of the string (strDisplayResult) that reads "Do you wish to q

Order of Complexity

The algorithm has the order of complexity shown, and takes the indicated time for a problem of size 50.0. Fill in the amount of time for the algorithm will take for the other sizes shown. Function Size 50 Size 51 Size 60 O(N ^ N) 1 second ______ ________

Exam Question on grammar from Languages&their implementation

(ii) Using the grammar below:- S -> pAb Production No. 1 A -> cB | a Productions No. 2 and 3 B -> cb Production No. 4 Construct a table with four columns that indicate the step number, state of the input, derivation, and rule applied, and hence show how the string:- pccbb can be parsed top-dow

Classes and Enumerators

Write a program similar to the following: wavelength.cpp computes the wavelength of light for a fiven Color. Input: theColor, a Color value Precondition: theColor is one of RED, ORANGE, YELLOW, GREEN, BLUE, INDIGO, VIOLET Output: the wavelegth of light corresponding to theColor, but that uses the Color class hierarchy.


Write a function calculateTaxes () that calculates and returns the amount of city incom tax and the amount of federal income tax to be withheld from an employee's pay for one pay period. Assume that city income tax withheld is computed by taking 1.15 percent of gross pay on the first $40,000 earned per year and that federal inc


The graph of a person's emotional cycly y=f(x) is a sinc curve having an amplitude of 1 and a period of 28 days. On a given day, the person's emotional index is f(age), where age is his or her age in days. Similarly, the physical and intellectual cycles are sine curves having an amplitude of 1 and periods of 23 and 33 days,

Using Classes

Write a program to display the lyrics of "Happy Birthday to You."

Program for wind speed, temperature, humidity

In a certain region, pesticide can be sprayed from an iairplane only if the temperature is at least 70 degrees, the relative humidity is between 15 and 35%, and the wind speed is at most 10 miles per hour,


A datagram subnet allows routers to drop packets whenever they need to. The probability of a router discarding a packet is p. Consider the case of a source host connected to a source router, which is connected to the destination router, and then to the destination host. If either of the routers discards a packet, the source host

Binary Numerals and Decimal Values

Question: Change the following binary numerals into decimals: (1) 101.101 (2) 11.011 (3) 1010.1011 (4) 111.1111 Make sure to show all work involved.

Stop and Wait Problem

A channel has a bit rate of 64 kbps and a propagation delay of 20 msec. For what range of frame sizes does stop-and-wait give a channel efficiency of at least 50%.

Give an example of a weighted directed graph with at most 5 vertices such that Dijkstra's algorithm will NOT give the correct results for the shortest path lengths from source s to every other vertex. algorithm

Give an example of a weighted directed graph with at most 5 vertices such that Dijkstra's algorithm will NOT give the correct results for the shortest path lengths from source s to every other vertex. Your graph may have negative edge weights but NO negative weight cycles. Indicate what answer Dijkstra's algorithm would give a

Storage on a disk with 2 surfaces

Background: I have a hard magnetic disk w/2 surfaces. The storage area on each surface has an inner radius of 1cm and and outer radius of 5cm. Each track holds the same number of bits even though the size differs from each other. The max storage density of the media is 10,000 bits/cm. The spacing between corresponding points

Bit pair recoding

I have to use use bit pair recoding to multiply 010011 (multiplicated) by 011011 (multiplier).

Show results for specific operations when x=1000 001 1001 0101.

For X = 1000 0011 1001 0101, show the result of the following operations: a) shr(X) ____ ____ ____ ____ b) shl(X) ____ ____ ____ ____ c) cir(X) ____ ____ ____ ____ d) cil(X) ____ ____ ____ ____ e) ashr(X) ____ ____ ____ ____ f) ashl(X) ____ ____ ____ ____ g) dshr(X) ____ ____ ____

Smooth functions

PLEASE see attachment for proper display of equations. Let f be a function from N to R+ . Function f is eventually nondecreasing if such that . Function f is smooth if it is eventually nondecreasing and such that . (a) Is the function + such that a smooth function? Verify! (b) Is the function + such th

Binary Floating Point Addition

I need this problem in the same format with 23.5 and 12.5 used as the decimals to be used. I need this to validate my own answer. A full example of Binary Floating Point Addition: Add decimals 10.5 and 3.5 using binary floating-point addition. 10.5 = 1010.1 3.5 = 11.1 Normalize: 10.5 = 1.0101 x 2^3 3.5 = 1.11