Answered step by step
Verified Expert Solution
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
(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-catchStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started