Answered step by step
Verified Expert Solution
Link Copied!

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]

  1. Int countCharacters(File), to count total characters of the given text file excluding spaces and display it. [4 Marks]
  2. Int countWords(File), to count words of the given text file and display it. [3 Marks]
  3. Int countVowels(File), to count words of the given text file and display it. [4 Marks]
  4. 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]
  5. 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]
  6. 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

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

Step: 3

blur-text-image

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

explain what is meant by redundancy

Answered: 1 week ago