How to produce an average class with a public data

Assignment Help Computer Engineering
Reference no: EM132238

Question

Produce an Average class with a public data member to collect the sum of integer entries and a public data member to hold the double average of the sum of the 10 integers.

Public class method to get each integer number input.
Public class method to calculate an average of the numbers input.

Public class method to output an average of the numbers input.

Main ( ) function that instantiates one Average object, and contains for loop to take 10 inputs and calls to calculation and output method. The next chapter covers up looping; however, you should be able to build a for-loop to accomplish the 10 inputs. A for loop in C# is no different than a for-loop in C++ or Java.

Internal Documentation.
An example of possible output would look like this:
Enter an integer value: 1
Enter an integer value: 2
Enter an integer value: 3
Enter an integer value: 4
Enter an integer value: 5
Enter an integer value: 6
Enter an integer value: 7
Enter an integer value: 8
Enter an integer value: 9
Enter an integer value: 10
The average is 5.5, the sum of 10 numbers is 55

 

 

Reference no: EM132238

Questions Cloud

What is dft of a pure cosine wave cos : What is DFT of a pure cosine wave cos(t) sampled at n equally spaced points on the interval [0, 2π)?
How a box of caramel delites girl scout cookies : How to a box of Caramel deLites Girl Scout cookies Every spring you looking forward to buying a box of Caramel deLites Girl Scout cookies
Evaluate the price of the bonds at january : Determine the journal entry to record their issuance by The Bradford Company on January 1, 2013.
How to write code for selection sort, insertion sort : How to write code for selection sort, insertion sort. Using your performance of selection, bubble and insertion sort, add a counter in an appropriate place so as to measure the runtime of your code for example this capacity be a counter to track ..
How to produce an average class with a public data : How to produce an Average class with a public data Produce an Average class with a public data member to collect the sum of integer entries and a public data member to hold the double average of the sum of the 10 integers.
How to write a program to check the collision : How to write a program to check the collision Write down a java program to check if they will collide or not. If they are going to collide print a message that 'The crafts will collide at (x,y)' where co-ordinates (x,y) are on Map as points of co..
Determine net cash flow from operations : Determine net cash flow from operations
How to create a set in third normal : How to create a set in third normal RESERVATION(reservation id, date of reservation, start date, end date, (( customer id, customer name, customer address, customer type, customer type description, ((customer preferences)), customer credit card n..
What profit do you see with partitioned view : Explain your idea for a database along with your thoughts for a partitioned view. 1. How will you use this partitioned view?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Implement needham-schroeder protocol using python

Implement Needham-Schroeder protocol using python

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  What devices use to get efficient network communication

CNT Books has expanded considerably as you first got network up and running three years ago. It at the present occupies an entire floor in building, and its LAN has full-grown to contain several servers and more than 60 workstations.

  Type of data standard

What type of data standard are we dealing with in each scenario (metadata, spatial or attribute)? You work for Town of Ancaster prior to an amalgamation of New City of Hamilton. Your main responsibility was to retain Town's single line road network f..

  Security policy document project

Analyze security requirements and develop a security policy

  Hardware support to memory management

Study any two multicore processor architecture and discuss the following features briefly

  How to illustrate a memory map for a system

Illustrate a memory map for a system with a memory capability of 512MB. Each memory location in system is 8 bits.

  How to write a class named dayofyear that gets an integer

How to write a class named DayOfYear that gets an integer Day 2 would be January 2 Day 32 would be February 1 Day 365 would be December 31

  Examine the behavior of airfoil

Write HW assignment written in Matlab airfoils have different C mc/4

  Bourne shell and design suitable functions

Bourne shell and design suitable functions

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  What profit do you see with partitioned view

Explain your idea for a database along with your thoughts for a partitioned view. 1. How will you use this partitioned view?

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