C# Visual Studio

C# Assignment Help, C# Homework Help, C# Programming Help

1. C# Visual Studio.

"Display customer numbers in a ComboBox" The complete description is provided as a file and the access file that is needed if you start from scratch.You can either edit the file I have already started or create a new one. The one I have does not run properly but it may be easier to just edit the file.

2. Need help with C# homework assignment.

Write a console program that takes a 30 element array and using 3 threads, adds up the 30 values. Each thread will add 10 of the 30 values.

(1) create an integer array using the following 30 numbers:

43, 12, 93, 40, 1, 25, 4, 63, 92, 86, 46, 48, 18, 75, 82, 97, 89, 66, 49, 7, 62, 24, 47, 67, 88, 2, 74, 99, 23, 80

(2) Create 3 new thread objects assigning their required delegate method in the constructor. Let's name these methods workerBeeTask-1, workerBeeTask-2, and workerBeeTask-3

(3) Define a class that has four properties

- an integer array called theArray

- an integer variable called subTotal-1

- an integer variable called subTotal-2

- an integer variable called subTotal-3

(4) Instantiate an instance of this class, call it taxi. Then set the theArray property of taxi to the 30 element array you created at the top. Set each of the 3 subTotal-n properties to be equal to zero.

(5) now start each of the 3 threads, passing in the same taxi object to all 3.

(6) Now wait until all 3 thread are done. After they are done, add up the value of the 3 subTotal-n properties and write the combined total out to the console.

(7) Lastly write the 3 workerBeeTask-n methods. These methods will almost be identical. They should each get the array out of the object that was passed to them, add up 10 of the array elements, and write the total back into the object subTotal-n property.

workerBeeTask-1 should add the values from 0 to 9, and write the answer into subTotal-1

workerBeeTask-2 should add the values from 10 to 19, and write the answer into subTotal-2

workerBeeTask-3 should add the values from 20 to 29, and write the answer into subTotal-3

Answer Detail

Get This Answer

Invite Tutor