Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1: Write a parent abstract class MyDictionary in java with the following abstract methods: [3 Marks] Int countCharacters(File), to count total characters of the
Question 1:
Write a parent abstract class MyDictionary in java with the following abstract methods: [3 Marks]
- Int countCharacters(File), to count total characters of the given text file excluding spaces and display it. [4 Marks]
- Int countWords(File), to count words of the given text file and display it. [3 Marks]
- Int countVowels(File), to count words of the given text file and display it. [4 Marks]
- Boolean searchWord(File, String), takes a word as a string and searches that word in the given text file, if found returns true else returns false. [4 Marks]
- File openMyFile(String) used to open the given text file and returns it as a reference object. Also handle necessary exceptions to eliminate execution inconsistencies. [2 Marks]
- Void closeFile(File) used to close the file. [2 Marks]
Now, write a child class TestDictionary and inherit MyDictionary class to provide implementation to all above methods. Also write a main method in the child class to test all methods of the child class. [3 Marks]
Step 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