Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Assignment

For this assignment you will want to create 2 files called "RunMyMethods" and "MyMethods" The first file "RunMyMethods" will contain the main that calls a menu method and will have a loop structure that will allow a user to choose what program they want to run. The menu displayed will look like this:

1) Product no negatives
2) Find Twelve
3) Max Min Avg
4) Letter Grade
5) Exit

The second file "MyMethods" will have methods in it that correspond to the menu shown above. The methods should do the following:

1. Write a program that will find the product of a collection of data values. The program should ignore all negative values and terminate when a zero value is encountered.

2. Write a program to read in a collection of integer values, and find and print the index of the first occurrence and last occurrence of the number 12. The program should print an index value of 0 if the number 12 is not found. The index is the sequence number of the data item 12. For example if the eighth data item is the only 12, then the index value 8 should be printed for the first and last occurrence.

3. Write a program to find the minimum, maximum, and average values of a collection of data values. The number of data values is unspecified.

4. Write a program to read in a collection of exam scores ranging in value from 0 to 100. The program should count and print the number of A's (90 to 100), B's (70 to 89), C's (50 to 69), D's (35 to 49) and F's (0 to 34). The program should also print each score and its letter grade. Use the following test data:

63 75 72 72 78 67 80 63 0 90 89 43 59 99 82 12 100 75.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92746779

Have any Question?


Related Questions in Computer Engineering

The gravitational attraction between any two objects in the

The gravitational attraction between any two objects in the universe is given by the following formula: Force of Gravity = (G * m * n) / r 2 Where  m  and  n  are masses of the objects in kilograms,  r  is the distance b ...

1 what is the purpose of exclusive gates such as the xor

1. What is the purpose of exclusive gates such as the XOR and XNOR? 2. What function do these gates perform?

Question as you are reviewing the results of your various

Question : As you are reviewing the results of your various scans, what factors do you believe you would take into consideration when determining priority? The priority would be used to determine remediation efforts. So, ...

Imagine a small city chambana with a labor demand function

Imagine a small city Chambana with a labor demand function E=200-1/2w and a labor supply function E=2w-100. Assume that there is a sudden influx of 40 perfect substitutes immigrants. a. How does this affect the natives i ...

A set of coins makes change fornbspnnbspif the sum of the

A set of coins makes change for n if the sum of the values of the coins is n. For example, if you have 1-cent, 2-cent and 4-cent coins, the following sets make change for 7: 7 1-cent coins 5 1-cent, 1 2-cent coins 3 1-ce ...

Ellen is an anthropologist who has been working at olduvai

Ellen is an anthropologist who has been working at Olduvai Gorge in Tanzania for the past six months. She has been conducting research on the Internet. She finds a Web site with an article that proposes a revolutionary t ...

Suppose pointers are 4 bytes long and keys are 12 bytes

Suppose pointers are 4 bytes long, and keys are 12 bytes long. How many keys and pointers will a block of 16,384 bytes have?

Artificial intelligence techniques assignment -

Artificial Intelligence Techniques Assignment - Combinatorial Optimisation Learning Outcomes Covered 1. Research and analyse the general nature of artificial intelligence and the problems it solves. 2. Apply and evaluate ...

If you set a lenient significance level eg 20 what is the

If you set a lenient significance level (e.g., .20), what is the effect on the probability of a Type I and Type II error (answer in terms of high or low probability for each Type of error)?

Suppose a graph is represented by a list of lists a of

Suppose a graph is represented by a list of lists A of zeroes and ones. If there is an edge from node i to j, then A[i][j] = 1, otherwise A[i][j] = 0. Write a Python function to find a path between any two nodes. Write c ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As