README.md
md1 kBIn final_24_25_1.zip
Exercise 3:
Write a Java program that uses RMI (Remote Method Invocation) to count vowels and consonants in a given string.
Server Side:
- Define a remote interface named TextAnalysisService with methods:
- int
countVowels(String input) - int
countConsonants(String input)
- int
- Implement this interface in a class called TextAnalysisServicelmpl, where:
countVowels()returns the number of vowels (a, e, i, o, u)countConsonants()returns the number of consonants
- Host the remote object using RMI registry.
Client Side:
- Develop a client that connects to the remote TextAnalysisService.
- Prompt the user to input a sentence.
- Call the remote methods to get the number of vowels and consonants.
- Display the results to the user.