Unique Word ISC Computer Science 2022 Semester 2 Theory
Design a class Unique , which checks whether a word begins and ends with a vowel. Example : APPLE, ARORA, etc. The details of the members of the class are given below: Class name : Unique Data members/instance variables : word: stores the word len: to store the length of the word Methods/Member functions : Unique(): default constructor void acceptWord(): to accept the word in uppercase boolean checkUnique() checks and returns 'true' if the word starts and ends with a vowel otherwise returns 'false' void display(): displays the word along with an appropriate message Specify the class Unique giving details of the constructor, void acceptWord(), boolean checkUnique() and void display(). Define the main() function to create an object and call the functions accordingly to enable the task. import java.util.Scanner; class Unique{ String word; int len; public void acceptWord(){ Scanner in = new Scanner(System.in); ...