Define class StringCheck with required instance variables 2) The StringCheck class should have six methods to do the below functions. I. Check if the user entered string is a s imple sentence? ( Starts with capital letter, Ends with period, space between words). II. Check if the user entered string is a q uestion? (Check if the string starts with a c apital letter, ends with a question mark, space between words) - III. Check if the user entered string have numbers in it ? - IV. Check if string is a valid email . – V. Check if the user entered strings ( two separate string s) are same? – VI. A method to check if the user entered character is present in the user entered string. Add a second constructor to initialize string and character when object is created. – 3) Comment all the parameters used using @param and return value using @return before each method, to explain the parameters passed and the return value . 4) Write a Main class with the main function to accept string/s from the user and test the Strin gCheck class methods. 5) Give each test string you used for the test and the output of the program with out using regex.Matcher or regex.Matcher
Define class
StringCheck
with required instance variables
2)
The
StringCheck
class should have
six
methods to do the below functions.
I.
Check if the user entered string is a s
imple
sentence? (
Starts with capital
letter, Ends with period, space between words).
II.
Check if the user entered string is a q
uestion?
(Check if the string starts with
a c
apital letter, ends with a question mark, space between words)
-
III.
Check if the user entered string have
numbers
in it
?
-
IV.
Check if string is a valid email
.
–
V.
Check
if the user entered strings (
two
separate
string
s)
are same?
–
VI.
A method to check if the user entered character is present in the user entered
string. Add a second constructor to initialize string and character when object
is created.
–
3)
Comment all the parameters used using
@param
and return value using
@return
before
each method, to explain the parameters passed and the return value
.
4)
Write a Main class with the main function to accept string/s from the user and test
the
Strin
gCheck
class
methods.
5)
Give each test string you used for the test and the output
of the program
with out using regex.Matcher or regex.Matcher
Step by step
Solved in 2 steps