1. Define a method hypotenuse that calculates the length of the hypotenuse of a
right triangle when the lengths of the other two sides are given. The method should
take two arguments of type double and return the hypotenuse as a double.
Incorporate this m
Create a class called Employee that includes three pieces of
information as instance variablesa first name (type String), a last
name (type String) and a monthly salary (double). Your class should
have a constructor that initializes the three instance var
(Rectangle Class) Create a class Rectangle. The class has attributes length
and width, each of which defaults to 1. It has methods that calculate the
perimeter and the area of the rectangle. It has set and get methods for both
length and width. The set me
2.(Sales Commissions) Use a one-dimensional array to solve the following
Write a C+ program to test the following math
For each of the following sets of integers, write a single statement
that will display a number at random from the set:
a) 2, 4, 6, 8, 10.
1. A stream is a flow of data into or out of your program.
2. An input stream is a stream of data flowing from your program, either to a file, or to
Explanation: From the viewpoint of
1) Create the file a.dat using the program shown in the class (File processing notes posted on blackboard)
2) Read the data from the file and print the record of the students whose grade is greater than 80.
You should input the following data into
1. A pointer is a variable that holds the address of some other location in memory.
2. Pointer variables are just memory addresses and can be assigned to one another
without regard to type.
3. The declaration below declares three poin
A file is a collection of information that has been assigned a name and stored on a disk separately from the
program that created it.
A file may contain
Programs and instructions (program files)
Text (data files).
One file my be broken up
Develop a C+ application that will determine whether any of several
department-store customers has exceeded the credit limit on a charge
account. For each customer, the following facts are available:
a) account number
b) balance at the beginning of the
Write a complete program that prompts the user for the radius of a sphere,
and calculates and prints the volume of that sphere. Use an function
sphereVolume that returns the result of the following expression: (4.0 / 3.0 *
3.14159 * pow(radius, 3).