""""Guys Pa help ako sa Homework ko
"""""
In your program, allow your user to enter a base text with characters greater than 4. If the base text is less than 4 characters, your program should say that the base text should be greater than 4 characters and asks the user the input another base text. After the user have inputted a valid base text, allow your users to enter 5 valid unique combinations with 3 or more characters with respect to the base text.
Further details and examples:
+++++++++++
Valid / Invalid Base Text:
----------------------
1. Base text should not contain any spaces
Valid: mabuhay, intrprg, computer, laptop, iwillpass, animo
Invalid: hello world, hail hail hail, one big fight
2. Base text should contain 5 or more characters
Valid: guitar, sembreak, hello, world
Invalid: 098, pop, mad, dad, ap, apt, past
Valid / Invalid Combination:
----------------------
1. A combination is considered valid if all of the letters in the combination exists (regardless of character case) in the base text and with respect to the count of the base text's letters as well. For example:
Sample 1 (character cases):
BaseText: PaLaWaN
Valid combinations: pal, alaw, naw, alan, PAL, WAN, NAW, PAW, pAWaN, AwaN
Sample 2 (letter combination):
Base Text: mabuhay
Valid combinations: mabuhay, buhay, hay, aym, may, bay, ayb
Invalid combinations: mabuhayy (there is only 1 'y' in the base text), taboo ('t' does not exist in the base text)
2. A combination is considered valid if it is composed of 3 or more characters.
Base Text: mabuhay
Valid combinations: mabuhay, buhay, hay, aym, may, bay, ayb
Invalid combinations: ay, ha, m, a, b, u, h, a, y, ma, bu
3. A combinations should be unique and no duplicates are allowed
Valid:
Base Text: mabuhay
Previous Combinations: mabuhay, buhay, hay, aym
Current Combination: may ("may" hasn't been entered before and the entry is valid. Therefore, this is "may" is valid)
Invalid:
Base Text: mabuhay
Previous Combinations: mabuhay, buhay, hay, aym
Current Combination: buhay ("buhay" is valid, but "buhay" has already been entered before)
Your program should be able to inform your user that they have entered an invalid or valid entry depending on their input with respect to the base text and its length.
Program:
----------------------
Once your program has already accepted 5 valid combinations, your program should show all of the valid combinations that the user has entered previously and ends.
Your program should be able to compile and run using the java and javac method.
Console-based
Codes should contain methods (a.k.a. functions) (the very least 2. 1. for checking the validity of the combination versus base text, 2. for checking duplicate entries)
Programs should compile and run (if your program produces an error/s, during compilation, your program will no longer be subjected for checking)