Purpose
The purpose of this request is to create a C# class representing sets of integers in the range 0 to 50 inclusive.
You should work in your groups (2 members). If your partner is not present in class each will need to complete the request on your own by the due date/time.
Always bring to class
- Deitel’s book.
- This request grade sheet for this lab already printed out.
- USB Flash drive(s) or other storage media.
- Your laptop with Microsoft Visual Studio 2015.
Mandatory Instructions
Begin by creating a solution folder on the ZIP disk, USB flash drive, or your laptop’s HD. The folder’s name should be one or two last names followed by Lab1 (e.g. Smith-Lab1 or Smith-Jones-Lab1) if both group members are working on the solution.
You will create a file IntegerSet.cs that will be compiled into IntegerSet.dll. Begin by creating a makefile that you will use for this request. The application created by the makefile should be called Lab1.exe. Also implement the “clean” target so that you can type “make clean” for the current directory. Use the command-line compiler csc for this request. Do not use Visual Studio GUI!
Define the IntegerSet class in the file IntegerSet.cs. Use the same namespace (Set) that is used for the main program. Remember to make your class public. Hint: Because the only integers allowed are those in the range 0 to 50 inclusive, you don’t really need the overhead of linked lists to implement the set. Use a bool array of length 51 to represent the set. If the value of position i is true, that means that i is in the set. (Example: If arr[5] is true, that means that 5 is in the set.) These are the public member functions of IntegerSet
You might find it convenient to define one or more private functions for use in your function implementations. Make sure to document your code and to use meaningful variable names.
When you have fully debugged your code, upload your compressed solution folder to Canvas (both group members should upload the solution). Your folder should contain only three files (App.cs, IntegerSet.cs, makefile) for this request.
Sample output for this program is provided below
1 | A is: { 3 4 11 21 29 } |
Code Documentation
Each of your source files should contain a documentation header with description, author name, class information. Each function should have a documentation header with minimally function name, description, parameters, return value. Use proper program style at all times which means indentation, alignment, and whitespace. Utilize self-documenting code which means use mnemonic, i.e., meaningful variable/function/namespace/class names, etc.
What to turn in?
Submit compressed (.zip) solution folder via Canvas.
In your solution folder make sure that all necessary files to compile/link/execute your projects are provided.
Here are some files that may be required
- All required C# source files (.cs)
- makefile (if the solution requires it)
- The entire Visual Studio 2015 solution folder (if the solution requires it)