Question: 1. Your project will have two classes: Main and SpecialClass. SpecialClass will contain constructors and two private String variables, str1 and str2, with their associated

1. Your project will have two classes: Main and SpecialClass. SpecialClass will contain constructors and two private String variables, str1 and str2, with their associated setter and getter methods. SpecialClass will have a method called checkForAnagram() that will return true if the two Strings are anagrams of each other, else it will return false. Inside your Main class, you will only have the main() method. The main() method will take as input two String values from the user and will use SpecialClass to check whether the entered String values are anagrams of each other or not. Two String variables are said to be anagrams of each other if the characters of one can be rearranged to create the other. Example: Input: "iie", "iei" Output: Anagrams Input: "iie", "iii" Output: Not Anagrams 2. SpecialClass will contain another method called asteriskMe(). When called, this method will create two new strings, str3 and str4, such that a * will be placed after every even position character in the strings str1 and str2, respectively. Consider the first character to be of position 1 (not position 0 like we address arrays). Print the new strings in a separate line. Call this method from the main() method of your Main class. Example: Input: ABCDEFG , "HIJKL" Output: AB*CD*EF*G , "HI*JK*L"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!