Question: In C#, make sure to include an exception throw. For this activity, you will create a Word Occurrence Calculator. Create a Windows Forms Application that

In C#, make sure to include an exception throw.

In C#, make sure to include an exception throw. For this activity,

For this activity, you will create a Word Occurrence Calculator. Create a Windows Forms Application that contains a multi-line TextBox control (Input), a Button control (Calculate), and a Label control (Result). Your application will allow the user to enter text into the multi-line TextBox, and will calculate the number of occurrences of each unique word in the TextBox. Each unique word along with its number of occurrences will be displayed on a single line in the Result label. 1. Create a new Windows Forms Application 2. Add a class to your project named "Word Occurrence", with the following properties: Word (string) Count (integer) 3. Add a class named "WordCalculator" to your project. Add the following static method to your WordCalculator class: Calculate Occurrences: This method will take a list of strings as input, and will return a list of "Word Occurrence" items. If passed a null or empty list as input, it will throw a new exception with the message "Invalid input". 4. In your main form add the following controls: A multi-line Input TextBox A Calculate Button A Result Label Implement a handler for the button click event, that will take the text in textbox, split it into a list of words, and pass it to WordCalculator, then display the result list of the Word Occurrence list in the label. Each Word Occurrence item will be on a separate line

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!