Create a function template named average

Assignment Help Basic Computer Science
Reference no: EM131396052

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.

Reference no: EM131396052

Questions Cloud

How are nonparametric tests different from parametric tests : Name the test that is the nonparametric relative of an independent-samples t test. Name the relative of a paired-samples t test.- How are nonparametric tests different from parametric tests?
Decide whether or not mobile computing iws synonymous : Decide whether or not mobile computing and wireless computing are synonymous. Provide at least two reasons to support your assertion and justify your response.
Analyze the errors with a mann whitney u test : Many studies show that noise affects cognitive functioning.- Analyze the errors with a Mann-Whitney U test and write a conclusion about the effects of noise on reading.
Significant benefits to the use of public transportation : After a recent study showed significant benefits to the use of public transportation, government officials have hired your consulting firm to increase the use of public transportation.  In the initial meeting between the government officials and y..
Create a function template named average : 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 ..
Organization for economic co-operation and development : Every year in December, OECD celebrates International Anti-Corruption Day and its Initiative to Raise Global Awareness of Foreign Bribery.
Producer of calculators : You are a producer of calculators. In the market for calculators, two events happened simultaneously last month. There was a fire at your calculator factory that eliminated half of your firm's production capability. At the same time, your compens..
Determine whether you prefer a laptop or desktop : From the e-Activity, determine whether you prefer a laptop or desktop. Elaborate on the features that you would want your desktop or laptop to offer, and provide an explanation of why you would want such features.
Proper application of each step of each analysis : Calculus analysis and the Kantian analysis,step by step, and tell me the answer to which each analysis leads. You will be graded on the proper application of each step of each analysis, including the reasoning behind each.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd