Explore BrainMass
Share

# Algorithms

### User Defined Functions

The function printGrade in this example {see attachment} is written as a void function to compute and output the course grade. The course score is passed as a parameter to the function printGrade. Rewrite the function printGrade as a value-returning function so that it computes and returns the course grade. (The course grade

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

### Process Action Code

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.

### Building Classes

Write a program to do rational number arithmatic, representing each rational number as a class that has instance variables for the numerator and the denomonator. The program should read and display all rational numbers in the format a/b, or simply a if the denominator is 1.

### Building Classes

The point-slope equation of a line having slope m and pasing through pint P with coordinates (x1, y1) is y-y1=m(x-x1). a. Write a class for a CartesianPoint, described by its x- and y- coordinates, with all appropriate operations on such objects. b. Write a LineSegment class, described by two CartesianPoint endpoints. In addi

### Stopwatch Program

Write a stopwatch program that will display time in letters approximately 2 inches high and 1 inch wide. Display minutes, seconds, and tenths of seconds. Have the elapsed time reset to 0.00.00 when the r key is pressed, and then begin time when the t key is pressed. Stop timing, and freeze the display, when the t key is pressed

### Functions

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

### Functions

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,

### Complement Representation of Numbers (III)

Subtract the given decimal numbers using 9's complement and 10's complement representations for negative numbers: 3529723 - 496713

### Division of the Floating Point Representation of Numbers: Divide in normalized floating point representation: (a) .6123 E -07 by .2132 E -03 (b) .8642 E 02 by .2562 E 02

Computer Organization Floating Point Representation of Numbers (XVII) Divide in normalized floating point representation: (a) .6123 E -07 by .2132 E -03

### Multiplication in Floating Point Representation of Numbers: Find the product in normalized floating point representation: (a) .4125 E -02 × .2121 E -03 (b) .5125 E -01 × .4021 E 02

Computer Organization Floating Point Representation of Numbers (XV) Find the product in normalized floating point representation:

### Multiplication in Floating Point Representation of Numbers: Find the product in normalized floating point representation: (a) .2341 E 05 × .3061 E 01 (b) .3152 E -02 × .1010 E 04

Computer Organization Floating Point Representation of Numbers (XIV) Find the product in normalized floating point representation:

### Multiplication in Floating Point Representation of Numbers: Find the product in normalized floating point representation: (a) .2341 E 05 × .3061 E 01 (b) .3152 E -02 × .1010 E 04

Computer Organization Floating Point Representation of Numbers (XIV) Find the product in normalized floating point representation:

### Floating Point Representation of Numbers

Find the difference in normalized floating point representation: (a) .642752 E -03 - .374804 E -03 (b) .824631 E 06 - .743215 E 06

### Floating Point Representation of Numbers

Find the sum in normalised floating point representation: (a) .436527 E 05 + .274356 E 07 (b) .623543 E 04 + .578132 E 05

### Floating Point Representation of Numbers (VI)

Find the sum in normalised floating point representation: (a) .436527 E 05 + .274356 E 07 (b) .623543 E 04 + .578132 E 05

### Floating Point Representation of Numbers

Find the sum in normalized floating point representation: (a) .23452 E 07 + .31065 E 07 (b) .74315 E 10 + .56231 E 10

### To change numerals into normalized form of floating point.

Change the following numerals into normalized form of floating point representation: (a) 1.25487×106 (b) .0125487×106 (c) 12.5487×106 (d) .000125487×106 (e) 125.487×106 (f) 125487×106 (g) 12548.7×106 See attached file for full problem description.

### Hops

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

### To Convert the Hexadecimal Numerals into Binary Numerals

Convert the following hexadecimal numerals into binary numerals: (a) 2BCD (b) A7DF (c) ABCD (d) E1BF2.

### Change (1100110110111)2 into (a) octal form and (b) hexadecimal form.

Change (1100110110111)2 into (a) octal form and (b) hexadecimal form.

### Change the Decimal Numeral Into Hexadecimal System

Change the decimal numeral 4246.625 into hexadecimal system.

### Change the decimal numeral 692.625 into octal numeral.

Change the decimal numeral 692.625 into octal numeral.

### Rayleigh Random Variable

What is the probability that a Rayleigh random variable lies between the 1.5 and 2.5 sigma?

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