Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

You may be asked to create a function to solve each of the tasks given below. For each task state the purpose of the function, what the function needs complete the task (input), what the function will send back to the function call (output), and the process (algorithm) needed to complete the task. Do not write any C++ code, but clearly specify input needed, output expected, and algorithm.

1. Design a function whose task is to robustly confirm the validity of the user's input for a dimension (the user's input will occur in main). When an incorrect value for a dimension has been entered, the function should output a message to those given below and prompt the user to re-enter the dimension. The function should return to the function call a valid value.
"The height of a rectangle must be greater than zero." (when checking the input for height of a rectangle) "The radius of a sphere must be greater than zero." (when checking the input for radius of a sphere)

2. Design a function to determine the minimum value in a set of 4 values. The function should return to the function call the minimum value

3. Design a function to determine the kinetic energy (KE) of a moving object given the formula KE = 1⁄2 mv2 where m is the mass of the object and v is the velocity of the object. You should assume the mass and velocity have already been confirmed to be valid. The function should not contain any input statement and should return the kinetic energy.

4. Design a function that will determine the average of 4 values. You should assume the four values have been confirmed to be value The function should not contain any input statement and should return the average.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91519315
  • Price:- $25

Priced at Now at $25, Verified Solution

Have any Question?


Related Questions in Computer Engineering

What is a survey and pros and cons of using this method to

What is a Survey and pros and cons of using this method to collect data are? Have you done a survey? How successful were your results?

1 what is the boolean expression for an and gate2 what is

1. What is the Boolean expression for an AND gate? 2. What is the Boolean expression for an OR gate? 3. What is the Boolean expression for a NOT gate?

Systems analysis projectpersonal trainer inc owns and

Systems analysis project Personal Trainer, Inc. owns and operates fitness centers in a dozen Midwestern cities. The centers have done well, and the company is planning an international expansion by opening a new "superce ...

Describe a study you might conduct in which it would be

Describe a study you might conduct in which it would be appropriate to compute a Pearson r(i.e., a study with one group of participants with two scores per participant). Predict if you perceive that the r-value would be ...

Taylor found that 8 of the recipients of loans from a

Taylor found that 8% of the recipients of loans from a particular mortgage lending institute default within the first 3 years. If he takes a random sample of 4 customers, who received loans 3 years ago, what is the proba ...

Question questions 1 - 3 are related to singly linked list

Question: Questions 1 - 3 are related to "singly linked list". You must type your answer. 1. What are the fundamental operations of a linked list? 2. What is the main advantage of a linked list over an array? 3. What is ...

Question what sequence of numbers would be printed by the

Question : What sequence of numbers would be printed by the following recursive function if we started it with N assigned the value 1? def Exercise (N): print(N) if (N Exercise(N + 1) print(N)

Coa assignment task -q1 a the fibonacci numbers are the

COA Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of ...

A random sample of n data values is obtained from a process

A random sample of n data values is obtained from a process having an absolutely continuous cdf of unknown shape. The metallurgist wants to select the best fitting distribution among several candidate cdfs. She decides t ...

Question 1 designing team and team identityusing the

Question: 1. Designing Team and Team Identity. Using the Internet, team should read at least 5 academically reviewed articles on designing. 2. Please do not change the wording of the original summary. Include the team me ...

  • 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