Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(in java programming language) Lab 10: Files and Streams (2) Character Streams_ Sequential-Access Text Files (2) Create a class MyFileReader with the following: One private

image text in transcribed

(in java programming language)

Lab 10: Files and Streams (2) Character Streams_ Sequential-Access Text Files (2) Create a class MyFileReader with the following: One private instance variable of type Scanners. b. a. Another private instance variable of type File c. A constructor for MyFileReader class to initialize File with a given file name. If the file doesn't exist or if it is not readable, throw IllegalArgumentException d. Two methods openFile and closeFile to open and close the scanner. e. A Boolean method that searches for a given word. f. An in 8. A method that prints the number of words and the number of characters in a given line number. h. A method that copies the content of the current file to another and converts any string "java" to t method that returns number of occurrences for a given word that is not case sensitive. upper case. Create a test class to demonstrate MyFileReader capabilities. Handle all exceptions by using try-catch

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Oracle Solaris 11 System Administration

Authors: Bill Calkins

1st Edition

0133007170, 9780133007176

More Books

Students also viewed these Databases questions

Question

When is it appropriate to use a root cause analysis

Answered: 1 week ago