Create a text file with one record of text data

Assignment Help Computer Engineering
Reference no: EM131299903

Create a text file with one record of text data. This text file will be read by the program and the data in the text file will serve as a search term.

Design, implement, test, and debug a C# program using the following guidelines.

• In the form load event, read the text file you built. This row of data will be a word or phrase that may occur in the data entered on the form (referred to later as "search term"). Convert the text read to uppercase.

• Create a form with textboxes for 10 input fields. Designate the fields in such a way that the user enters specific data (for example, movies, books, names, or sports). The data entered should be of type string.

• Add a button, "Accept Input", to accept the input. In the click event for the button, validate the input and load the input into an array.

o Validate the input by calling a value-returning method. Pass the 10 input fields to the method and return a value to indicate whether or not the data passed validation (for example, you can return a zero if the data passed validation and a 1 if it did not). Validation should consist of checking if data was entered in the field. Notify the user if the data is not valid and stop execution.

o Add a void method that loads the input fields into an array and converts the data in them to uppercase.

• Add another button, "Sort Input", to sort the input data. In the click event for the button, add a void method to do the sorting. In the void method, use the selection sort algorithm presented in chapter 7 to sort the data. After sorting, in the button click event, create a loop to iterate through the array of sorted data and display the data in a listbox on the form.

• Add a final button to the form, "Check Input". In the click event for the button, call a value-returning method. This method will compare the data in the array and the search term (data read in the form load event). Count the number of elements in the array in which the search term is found. Pass the number of times the word or phrase is found back as the value returned. Put the results in a label on the form. For example, if my search term is "the", the label might say "Search term - the - is found 3 times in the input data". The search should count as a match if the search term is only a portion of the array element. For example, if your search term is "the" and the array element is "The Old Man and The Sea", it should count as a match because "the" is contained within the array element. However, you do not need to count all occurrences of the search term in the array element. So, in "The Old Man and The Sea" example, count once, not twice.

Here is an example. My search term is "the". The array elements are: "The Old Man and The Sea", "Jane Eyre", "Moby Dick", "The Great Gatsby", "MacBeth", "The Iliad and the Odyssey", "Huckleberry Finn", "Catch-22", "To Kill a Mockingbird", and "The Bell Jar". With this data, the program should find 4 occurrences of the search term (those array elements that are underlined).

The type of application to be developed is a Windows Forms application.

Please note that the reason the selection sort algorithm is required for this assignment is two-fold. First, it will give you a chance to look at someone else's code and learn it well enough to figure out how to modify it. Second, it will give you additional practice with string handling when you learn how to compare strings. It is not acceptable to try to find another way to sort the data.

Include identifying information in the form of block comments at the top of each class in the project (programmer name, date, program description). Include adequate comments throughout the program, utilize meaningful names for controls, variables, fields, and forms. Include white space for readability purposes in the code. The focus of the project is on learning the C#.Net syntax. However, ensure the form is simple and easy to understand for the user.

Reference no: EM131299903

Questions Cloud

What is the purpose of your mission trip : MAT-144 Mission Project. What is the purpose of your mission trip? In general, mission trips fall into three categories - providing aid in the form of supplies, providing education, and providing services such as medical clinics and building house..
What rate of return should jacobs require on a project : What rate of return should Jacobs require on a project of average risk?- If a new venture is expected to have a beta of 1.6, what rate of return should Jacobs demand on this project?
Write a program that design a class named month : Design a class named Month . The class should have the following private members: name A string object that holds the name of a month, such as "January," "February," etc.
Main types of linux commands : Which of the following is not one of the three main types of Linux commands?
Create a text file with one record of text data : Create a text file with one record of text data. This text file will be read by the program and the data in the text file will serve as a search term.
Write a system to read from a file list of employee payroll : Write a system to read from a file a list of employee payroll information, calculate net salary amounts based on base salary, bonus, and % deduction.
What is the current market price of these bonds : Western Enterprises' bonds have 10 years remaining to maturity. Interest is paid annually, the bonds have a $1,000 par value, and the coupon rate is 9 percent. The bonds have a yield to maturity of 7 percent. What is the current market price of th..
What is the post merger eps : Calculate the merger premium and the exchange ratio:- What is the post-merger EPS?- Is there any evidence of dilution of ownership or earnings in either merger transaction?
Prepare the budgets for june : Prepare the budgets for June Revenue, Production, Material usage and Material purchase ( how many pounds of material should be purchased and what is the cost of purchases)

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd