Functionality Overview: You will create a class that represents a set of integers. The class will provide basic statistical data about the integers such as the sum of the integers and the average of the integers. You will also create a Windows application that uses the class you develop.

Detailed Instructions:

  • Read all instructions before beginning.
  • Create a new Visual solution with two projects: a Windows Application project and a class library project.
  • Make sure that you use proper naming conventions in your work.
  • Make sure that you use appropriate data types.
  • In your class library, create a class that represents a set of integer numbers.
  • Your class should have a parameterized constructor. The constructor should take 1 parameter: The maximum number of integers to be retained in the set
  • Your class should contain private data to retain the following information:
    • Multiple integers where the numbers of integers is not greater than the maximum specified by the constructor parameter - You must use an integer array for this purpose.
    • Note: You will likely have additional data private to the class at your discretion.
  • Your class must have a method whose purpose is to allow an integer to be added to the set of integers in the class.
    • The method should take 1 parameter: integer to be added to the set.
    • The method should put the integer into the array you are using.
    • If there is “no more room” for additional integer, then your method should throw an exception. That is, if the set already holds the maximum number of integers (as specified by the constructor parameter), then the method should throw an exception.
  • Your class must have a public property that provides the sum of the integers in the set.
  • Your class must have a public property that provides the average of integers in the set.
    • The property should have a float data type.
  • Your class must have a public property that provides the count of the integers in the set.
  • Create a public property that provides the smallest integer in the set.
  • Create an indexer for your class.
  • In your Windows application, write code to demonstrate the functionality of your class.
    • Your application must create an instance of the integer Set Class that will hold Up to 4 integers.
    • Your application must allow the user to enter an integer and add it to the set. Note that the user should be able to repeat the addition of a number to the set multiple times.
    • Your application must use the properties of the Integer Set class to display sum, average, and count of the numbers entered. Your application should display the values after each entry of an integer. Your Windows application should not do any calculations. All calculations should be handled in the Integer Set class.
    • You must make your application sufficiently robust that it will not “crash” when user input is incorrect.
    • Your form might look like the following: See image.
Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.