Your Perfect Assignment is Just a Click Away
We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

jAVA Class Homework assignment 4

jAVA Class Homework assignment 4

Class Homework assignment 4
Write a Java program to achieve the following: – First, create an algorithm to solve this problem.
Ask the user for a search-word to be found in the text of an input file.
Read each line of the input.txt file (supplied by you), and search each line to see if it contains the search
word. If the search-word is found within the line of text, then output that line to an output.txt file, and
display the line on the screen with an indication that the line contains the search-word (prefix the line
with [sw found]). Lines not containing the sw should just be written as is to the screen.
Example of input.txt
In-class assignment 1
Create a java program to achieve the following:
Ask the user for the number of integers to randomly generate.
Create an integer array of the appropriate size and insert the randomly generated integers (in the range 1 –
100) into the array.
Ask the user for a search value (integer), then check to see if the array contains this value and display a
message to indicate if found or not.
Finally, display the contents of the array, the sum of the numbers in the array, the smallest value and the
largest value in the array.
[email protected] – the
Output.txt file
Ask the user for the number of integers to randomly generate.
Create an integer array of the appropriate size and insert the randomly generated integers (in the range 1 –
100) into the array.
Ask the user for a search value (integer), then check to see if the array contains this value and display a
Finally, display the contents of the array, the sum of the numbers in the array, the smallest value and the
Screen output
In-class assignment 1
[sw found] Create a java program to achieve the following:
[sw found] Ask the user for the number of integers to randomly generate.
[sw found] Create an integer array of the appropriate size and insert the randomly generated integers
[sw found] (in the range 1 – 100) into the array.
[sw found] Ask the user for a search value (integer), then check to see if the array contains this value
and display a message to indicate if found or not.
[sw found] Finally, display the contents of the array, the sum of the numbers in the array, the smallest
value and the largest value in the array.
[email protected] Credit
 Request the input/output file names from the user
 Place the search word inside the marker. For example, if the search word was the, then the
marker would be [the found]
 Modify the file output to append to the existing file rather than overwriting the data
 Make the search case-insensitive (the The THE)
Extra-extra credit
 Include the number of times the search word appears in the line
For example, line 5 would show as:
[the found (4) times] Create an integer array of the appropriate size and insert the randomly
generated integers (in the range 1 – 100) into the array.

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: I'm Homework Free only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by I'm Homework Free are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. I'm Homework Free is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At I'm Homework Free, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.