Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Complete the following tasks:

a. Create a function template named average(). It accepts two arguments of the same type and computes their arithmetic average. The average is returned as a double.

b. Overload the average()function to work correctly with three arguments.

c. Create a class named CollegeCourse with fields for the course ID (for example, ‘ENG 101'), your grade (for example, ‘A'), and the credits earned for the CollegeCourse (for example, 3). The CollegeCourse constructor accepts values for these fields as arguments, and calculates a fourth field named honorPoints. Calculate honorPoints as the product of the grade points (4 for an A, 3 for a B, 2 for a C, and 1 for a D) and the credits. Overload the + operator so that honor points for courses can be summed to create a summary CollegeCourse object. Overload the / operator so that a CollegeCourse object's honorPoints can be divided by an integer. Overload the

d. Write a main()function that declares several integers, doubles, and CollegeCourses, and demonstrates that both versions of average()work correctly with different arguments. Save the file as Averages.cpp.

e. Design a class of your choice where averaging objects makes sense. Include any necessary member functions so the class can be demonstrated using the average()template functions, and write a main()function that provides the demonstration. Save the file as Averages2.cpp.

Computer Engineering, Engineering

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

Have any Question?


Related Questions in Computer Engineering

The appendix to chapter one will be very useful in

The appendix to chapter one will be very useful in answering this question, if you need a refresher or introduction to regression analysis. The following equation is the regression results of a study on infant mortality ...

Software engineering problemdesign a software for

Software engineering problem: Design a software for restaurants to use, in order for restaurants to come up with the shortesh path of getting to houses in the order the orders came in, shows the deadline on each order to ...

What are the critical issues we must think about while

What are the Critical Issues we must think about while designing a Lexical Scanner? The results of that development, e.g., discuss both process and product.

Solve the problem by implementing the whole class with main

Solve the problem by implementing the whole class with main() function and demonstrate that your Java code can pass several appropriate test cases successfully in your main() function? Write a short recursive Java method ...

In the course of producing its output this firm causes

In the course of producing its output, this firm causes pollution. The government passes a law that requires the firm to stop polluting, and the firm discovers that it can prevent the pollution by hiring 0.2 workers for ...

Research ways that information systems have been misused

Research ways that Information Systems have been misused. Using the Internet, find an example of an organization that has misused Information Systems. Post your response to the discussion board. Respond to the following ...

Assignment 2 windows 8 upgradeby the due date assigned

Assignment 2: Windows 8 Upgrade By the due date assigned, submit your assignment to the Submissions Area. Scenario: You are a consultant for a company that is using Windows 7 as their operating system and are considering ...

In a particular two cities apartment prices are decreasing

In a particular two cities apartment prices are decreasing. One main factor driving apartment prices down in the cities is the supply in new apartments into the market is much greater than the increase in the demand for ...

Arectangular box without a top has surface area 2500 cm2

A rectangular box without a top has surface area 2500 cm 2 . The length x of its base is 18 cm longer that its width. • (a) Use MATLAB's polynomial functions to express the volume V of the box in terms of x. • (b) Plot V ...

Two one-cent coins were weighed on an electronic balance of

Two one-cent coins were weighed on an electronic balance of high sensitivity, and an average mass per coin of 2.4918 g was obtained from the data. How could you use the same number of significant figures as the value obt ...

  • 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