[login to view URL]

Completado Publicado May 24, 2004 Pagado a la entrega
Completado Pagado a la entrega

In this solution, you will create a Class Library project that will count the number of characters, words, sentences, and paragraphs contained in a text tile or a multi-line text box. You will also create a Windows Application to test the Class Library project you create. The Class Library project will have one class module. The class will have one method that will open a text tile file input. The same method should also count the number of characters, words, sentences, and paragraphs in the tile. Another method will perform the same task but use a multi-line text box.

## Deliverables

The developer should be able to read these values using read-only properties. The form will have an OpenFileDiaiog control instance to open a tile as specified by the user. The Figure shows the completed form. Save and execute the file named [url removed, login to view], (You will also need the file: [url removed, login to view]) setting the drive designator as necessary. Click the Analyze File button. When the Open dialog box appears, select the name of a text file on your computer. Click Open. The number of characters, words, sentences, and paragraphs contained in the text file will appear on the form. Exit the solution. Start VB .NET, and then create a new Windows Application project. Name the solution YourName_Unit5.sln. Add a Class Library project to the solution. Note that VB .NET will create an empty class mod??" tile. Name the Class Library project Unit5ClassLibrary. Set the name of the class automatically created by VB .NET to StringProcessor. Set the root namespace to Course. In the Windows Application project add a reference to the Class Library project. In the class module, declare hidden variables to store the number of characters, words, sentences, and paragraphs. Create four read-only properties named Characters. Words, Sentences, and Paragraphs. These properties should return the number of characters, words, sentences, and paragraphs, respectively, stored in the corresponding hidden variables. Create Property Procedures rather than Public variables. • Create a read-write property named StringContents, and a hidden variable to store the string. If the developer sets the property, calculate the number of characters, words, sentences, and paragraphs contained in the string, and then store the results in the hidden variables that you declared. Note: A word is a sequence of characters separated by a space. A sentence is terminated with a period, and a paragraph ends with a LineFeed character ([url removed, login to view]). Your solution does not need to account for malformed sentences. For example, a paragraph that ends in something other than a sentence with a period. In the class module, create a method named OpenFile. This method should accept one argument - the full path name of the file to be opened. In the OpenFile method, write the necessary statements to open the text file, then count the number of characters, words, sentences, and paragraphs. As you will he reading a disk tile, you will need to rise the StreamReader class to open and read the file. The process of determining what constitutes a word can be expanded. For example, in addition to having a space character separate a word, tab characters should also separate words. Add this feature to the OpenFile method and the StringContents property procedure. Create the control instances on the form as shown in the Figure. Write the code for the Analyze Text button. The code in this event handler should create an instance of the StringProcessor class. Set the StringContents property to the contents of the multiline text box. Assigning a value to the property causes the code you wrote in the Property Procedure to process the string, and set the values of the read-only properties. Store the value of the Characters, Words, Sentences, and Paragraphs properties in the output labels appearing on the form. Write the code for the Analyze File button. Use the OpenFileDialog control instance to get a file name from the user. Create an instance of the StringProcessor class. Call the OpenFile method to process the file. Finally, display the results from the read-only properties in the labels on the form.

## Platform

WinXP VB.NET

.NET Ingeniería MySQL PHP Arquitectura de software Verificación de software Visual Basic

Nº del proyecto: #3223404

Sobre el proyecto

6 propuestas Proyecto remoto Activo May 24, 2004

Adjudicado a:

visualcodervw

See private message.

$7 USD en 2 días
(19 comentarios)
2.7

6 freelancers están ofertando un promedio de $13 por este trabajo

TakeRealUK

See private message.

$17 USD en 2 días
(554 comentarios)
6.7
waynewareso

See private message.

$12.75 USD en 2 días
(75 comentarios)
5.2
tanveermoha

See private message.

$17 USD en 2 días
(74 comentarios)
5.1
shekky

See private message.

$8.5 USD en 2 días
(10 comentarios)
3.5
veryhuman

See private message.

$12.75 USD en 2 días
(1 comentario)
1.4
alecbanaleck

See private message.

$17 USD en 2 días
(0 comentarios)
0.0