Search item

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.
    • 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.
    • 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.

Search item

Need Solution Email me at: Topsolutions8@gmail.com

or

https://gum.co/xYeO

Programming Lab2

Lab 2
Goal: The purpose of this lab is to demonstrate an understanding of constructors.
Problem: You are working in GMU’s HR department. HR is responsible for tracking employee data to include: name, idNumber, department, and if orientation was attended. Whenever a new employee is hired, not all data is always available. You figure out data is always available in one of the following combinations:
 The ID number and name are known, but the department is not
 The ID number is known, but the name and department are not
 The ID number, name, and department are all known
If orientation was attended is never known.
The following employees currently exist:
 ID: 5678. Name = Mary Contrary. The department is unknown
 ID: 1234; Name = Stu Dyalot; Department = AIT
 ID: 2468; Name = Julian Date. The department is unknown
Create an object-oriented solution to:
 Simulate the creation of these three employees with a message noting all employees have been loaded
 Creates a fourth employee from user input, entering only an ID number and name
 Provides a menu of all four employees with the opportunity to mark employees as having attended orientation, until the user indicates they are finished.
o Note: Before marking an employee as having attended orientation, a check should occur to make sure the employee has not already attended orientation.
Note: Your program must use information hiding and your data definition class should not have any input or output statements in it.

The example run below shows how the program would run.

Programming Lab2

Need Solution Email me at: Topsolutions8@gmail.com

or

https://gum.co/KohG

OOP

Generate an object-oriented design for a system that keeps tracks of your CD and DVD collection.

Identify each of the classes, associated data, and operations for the classes.

Generate the pseudocode for each of the classes as demonstrated on p. 458 in Ch. 9 of Prelude to Programming.  Be sure to demonstrate the concept of Inheritance in your design.

Draw a GUI that will create the objects and provide access to each object’s processing methods.

OOP

Need Solution Email me at: Topsolutions8@gmail.com

or

https://gum.co/EMplN

Interfaces and Communication

Understanding object-oriented methodologies is often difficult. You already understand that object-oriented analysis and design emulates the way human beings tend to think and conceptualize problems.

As an example, consider a typical house in which there are several bedrooms, a kitchen, and a laundry room—each with a distinct function. You sleep in the bedroom, you wash clothes in the laundry room, and you cook in the kitchen. Each room encapsulates all the items needed to complete necessary tasks.

You do not have an oven in the laundry room or a washing machine in the kitchen. However, when you do the laundry, you do not just add clothes to the washer and wait in the laundry room; once the machine has started, you may go into the kitchen and start cooking dinner. How do you know when to go back to check the laundry? When the washer buzzer sounds, a message is sent to alert you to go back into the laundry room to put in a new load. While you are folding clothes in the laundry room, the oven timer may ring to inform you that your dinner is done cooking.

What you have is a set of well-defined components: Each provides a single service to communicate with the other components using simple messages when something needs to be done. If you consider a kitchen, you see it is composed of several, smaller components, including the oven, refrigerator, and microwave. Top-level objectsare composed of smaller components that do the actual work. This perspective is a very natural way of looking at the world, and one with which everyone is familiar. The same thing is done in object-oriented programming:

  • Identify components that perform a distinct service.
  • Encapsulate all items in the component necessary to get the job done.
  • Identify the messages that need to be provided to the other components.

Although the details can be quite complex, they are the basic principles of object-oriented programming.

Consider the microwave oven in your kitchen, using the object-oriented thinking described above.

Create a table with the following four column headings: Top-Level Objects, Communicates With, Incoming Messages, and Outgoing Messages.

  • Identity four (4) top-level objects of the microwave.
  • Explain some graphical user interfaces and communication messages that occur during the operation of a microwave.

Describe some of the advantages of having a componentized system. For example, what happens if the microwave breaks?

Interfaces and Communication

Need Solution Email me at: Topsolutions8@gmail.com

or

https://gum.co/dcgu

JAVA Code

{5, 2, 4, 6,1,3}

INSERTION-SORT .A/
1 for j = 2 to A.length
2 key = A[j]
3 // Insert A[j ] into the sorted sequence A[1. . j - 1]
4 i = j – 1
5 while i > 0 and A > key
6 A[i + 1] = A
7 i = i – 1
8 A[i + 1] = key

Cormen, Thomas H. (2009-09-15). Introduction to Algorithms (Page 18). MIT Press. Kindle Edition.

JAVA Code

Need Solution Email me at: Topsolutions8@gmail.com

or

https://gum.co/KUaWw

Death battle

Death Battle

You and an opponent will battle each other to the DEATH!! Each time you battle, you will inflict damage on your opponent, but your opponent will do the same to you.

You will be able to choose from 3 weapons, each inflicting damage (or reducing health) of a certain range. The damage incurred will be selected randomly. The catch is that you may only use some of the weapons a limited number of times.

 

Weapon Damage Range Number of rounds

Canon 10 – 15 3

Grenade 7 – 12 4

Rifle 3 – 8 Unlimited

 

You and your opponent will both start with a health level of 100. At the beginning of each turn, the user will select the weapon for the round. The computer will randomly select how much damage to incur from the range listed, and subtract that from the remaining health. Then, the computer will select a weapon at random and randomly select how much damage to incur from the range listed.

 

After each turn, list the remaining health for both teams. The team whose health reaches 0 first is the loser. The team with health remaining is the victor.

 

Nice additions:

  • · Randomly select which team fires first.
  • · Allow the player to play again after the game ends.

 

Note: The computer team shouldn’t be able to fire more rounds of each weapon than the maximum, just like the player.

 

Death battle

Need Solution Email me at: Topsolutions8@gmail.com

or

https://gum.co/lcgyP

Write a program to help a local restaurant automate its breakfast

Write a program to help a local restaurant automate its breakfast billing system. The program should do the following: a. Show the customer the different breakfast items offered by the restaurant. b. Allow the customer to select more than one item from the menu c. Calculate and print the bill Assume that the restaurant offers the following breakfast items (the price of each item is shown to the right of the item):
Plain Egg $1.45 Bacon and Egg $2.45 Muffin $0.99 French Toast $1.99 Fruit Basket $2.44 Cereal $0.69 Coffee $0.50 Tea $0.75
Please use an array, menuList, of the struct menuItemType. Must contain the following functions:
1. getData
2. showMenu
3. printCheck

 

Write a program to help a local restaurant automate its breakfast

Need Solution Email me at: Topsolutions8@gmail.com

or

https://gum.co/ebfE