No Repeat Program ISC Computer Science 2022 Semester 2 Theory
Design a class NoRepeat which checks whether a word has no repeated alphabets in it. Example : COMPUTER has no repeated alphabets but SCIENCE has repeated alphabets. The details of the class are given below: Class name : NoRepeat Data members/instance variables : word: to store the word len: to store the length of the word Methods/Member functions : NoRepeat(String wd): parameterized constructor to initialize word = wd boolean check(): checks whether a word has no repeated alphabets and returns true else returns false void prn(): displays the word along with an appropriate message Specify the class NoRepeat, giving details of the constructor, boolean check() and void prn(). Define the main() function to create an object and call the functions accordingly to enable the task. import java.util.Scanner; class NoRepeat{ String word; int len; public NoRepeat(String wd){ word = wd; len = word.le...