GetACoder.com

 
 

Home | My Account | Post Project | Browse Projects | RSS Feeds New!

 

Class Library Project

 
 
Download the Free Step-by-Step Guide
     
Budget: $ 20-100
Status: Closed for Bidding (selected user codigodelsur)
Project Creator:
nlittle  
  10.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/10 2 reviews
Required Skills:
Attached Files: (None)
 
post new project
email this project
discuss this project
send private message to project creator
more options

NEW

SEND

DISCUSS

CONTACT

OPTIONS

Description
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 file 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 file for input. The same method should also count the number of characters, words, sentences, and paragraphs in the file. Another method will perform the same task but use a multi-line text box. The developer should be able to read these values using read-only properties. The form will have an OpenFileDialog control instance to open a file as specified by the user. The Figure shows the completed form.

Save and execute the file named Ch12Ex1.exe, (You will also need the file: Ch12Ex1ClassLibarary.dll) 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 (Microsoft.VisualBasic.ControlChars.Lf). 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 file, 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.

Reminder
You may not start working in this and any project before your bid is accepted. Any user who violates this policy may have their account permanently suspended.

Reminder
You may not start working in this and any project before your bid is accepted. Any user who violates this policy may have their account permanently suspended.

 Bids Received (0)   Shortlist (0)   Declined Bids (0)   
Average bid amount:   $0.00   Average delivery time:   0 Day(s)
Place Bid | Post Similar Project | Send Project | Message Board(0) | Contact nlittle

Order by:

 

Remember that contacting the other party outside the site (by email, phone, etc.) on all business projects (before the project is awarded) is a violation of our terms of use. We supervise all site activity for such infringements and can immediately expel transgressors on the spot, so we thank you in advance for your cooperation. If you notice a violation please help out the site and report it. Thank you for your help.
 

          nbsp;    

 


 
Get the Free Step-by-Step Guide on How to Use GetACoder
The act of outsourcing projects has become easy in the past few years thanks to GetACoder. However, our team aims at making the whole process even easier. So, it has now come the time to provide you with a step-by-step guidance on how to use this service and succeed in the outsourcing world totally for FREE.

It doesn’t matter if you are a more experienced user or a novice; using GetACoder will become even simpler with the help of this E-book. There are two major sections: a Buyers section and a Coders section.

Buyers will learn:
  • How to outsource safely
  • How to pick the best freelancers
  • How to manage time and money

Coders will learn:

  • How to get the best projects
  • How to secure their payments
  • How to build a long-lasting relationship with buyers

    …and  MUCH MORE
Clear examples and pictures illustrating key situations, great tips and real testimonies of some of our best users… all in this Outsourcing Guide.  So don’t loose the outstanding opportunity to download GetACoder FREE E-book.
The Outsourcing Revolution: Why It Makes Sense and How to Do It Right
The Outsourcing Revolution: Why It Makes Sense and How to Do It Right
What is GetACoder?

GetACoder.comGetACoder is a leading Global Services Marketplace doing business in more than 200 countries. Our unique system accelerates your time to market and provides your business with key competitive advantages. When you use GetACoder you are stretching your budget and saving as much as 60% over traditional outsourcing. GetACoder is changing business, now it's no longer about what you own or build but which resources and talent you can access. With GetACoder you reduce expenses, increase efficiencies, aggressively grow your business, and create a sustainable competitive advantage. GetACoder makes outsourcing to any part of the world an easy task! With GetACoder it's simple to outsource any business project, gain access to global talent and manage projects online.

One of the main advantages of GetACoder is the low labor cost. The typically rates are about seven times lower than the ones in the US or Europe. Posting a project at GetACoder allows the right professional or company to find you and to bid for your work. We are building a reputation for exceeding our customers' expectations and for becoming an extremely cost effective way to outsource work. Use GetACoder when you want to save money, increase efficiency or accelerate the development of your project. With GetACoder you focus on growing your business and let others do the tedious work. Post your project on GetACoder for free. Find out why people outsource projects with us day after day.

Thousands of Satisfied Customers - Submit/View Quotes


-GetACoder is an excellent website. I got 5 projects within a month. It is really a nice site with an excellent payment system. I received my money within 5 days like they said. Another thing that impressed me is that you can call your money at anytime you wish, which is really an excellent feature. They also have a large list of payment providers, which is a good thing, as well. Thank you for making such a nice site for us to get projects. - rattanisoft
-I have used quite a few other sites, I believe best part of GetACoder is a ratio of winning a bid of much higher due to a lesser number of bidders per bid. Secondly, somehow it has a greater ratio of serious buyers, due to which the responses come very quickly after you post a bid. - itwiz
-some of man contact with me. i am satisfied. - hb1974
Report Violation    Privacy Policy     Affiliate Program    Terms of Use    Contact Us    Help      GetACoder.com Latest Projects RSS Feed
ScriptLance.com© 2004-2008 GetACoder. All rights reserved.