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

  Identify and describe based on your review existing and

review the operations page for riordan manufacturing.identify and describe based on your review existing and needed

  Create preventative controls for video game design company

Create Preventative Controls for SunGrafix, a video game design company. In some cases, the outage impacts identified in the BIA may be mitigated or eliminated through preventive measures that deter, detect, and/or reduce impacts to the system.

  Creating different volume such as the striped, mirrored

What should you do in order to create a different volume kind such as the striped, mirrored, or Raid 5 volumes? Why utilize the Windows command line when we live within the GUI world?

  What is total capacity of a track

What is total capacity of a track

  Design a dedicated datapath for inputting three 8-bit

design a dedicated datapath for inputting three 8-bit unsigned numbers and then output the. largest number followed by

  Evaluate the students capability in utilising hardware

Evaluate the student's capability in utilising hardware and design software for microcontroller unit (MCU) and writing a main program and other routines to ope the Unmanned Aerial Vehicle Ground Station (UAVGS).

  Graphically represent person class with the components

Instance variables name, age, and gender and instance methods setName, getName, and getAge.

  Does the triple des yield the same results

Does the triple des yield the same results as des if we use a single 56 bit key? why?

  Preserve uppercase letters for the first word of sentence

create a program that can be used to train the user to use less sexist language by suggesting alternative versions of sentences given by the user.

  Identify possible threats internal or external to a database

Identify possible threats internal or external to a database that may affect the following components of a database system

  Why is it especially important to verify

Why is it so important to verify and control project scope in IT projects? What is recommended for IT project managers to do to verify and control scope? Why?

  Evaluate the stock market performance of firms

This assignment is based upon O'Leary Lab 4: Stock Portfolio Analysis and consists of two (2) parts - an Excel-based assignment and a paper.

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