Posts

Showing posts with the label mix words character by character

Mix Words ISC Computer Science 2020 Theory

A class Mix has been defined to mix two words, character by character, in the following manner: The first character of the first word is followed by the first character of the second word and so on. If the words are of different length, the remaining characters of the longer word are put at the end. Example : If the first word in "JUMP" and the second word is "STROLL", then the required word will be "JSUTMRPOLL". Some of the members of the class are given below: Class name : Mix Data members/instance variables : wrd: to store a word len: to store the length of the word Member functions/methods : Mix(): default constructor to initialize the data members with legal initial values void feedWord(): to accept the word in uppercase void mixWord(Mix p, Mix q): mixes the words of objects p and q as stated above and stores the resultant word in the current object void display(): displays the word Specify the class Mix giving details of the constructor, void feedWo...