5
answers
0
watching
356
views

Write a program called Lab 5 that has 3 methods and a main method:
1) Method isUserNameValid has 1 parameter of type string and the method returns a value of type
boolean. If the parameter has less than 8 characters then the method returns false, otherwise it
returns true.
2) Method compare has 3 parameters all of type int and has a String return type. This method will
return
a. “All Same” if all 3 parameters are equal,
b. “All Different” if all 3 parameters are different.
c. “Mix number(s)” two of the numbers are the same and the 3rd is different.
3) Method isValid has 1 parameter of type int and returns a boolean value; the method returns true if
the parameter is in the range 0,…,100 inclusive, otherwise the method returns false.
4) Main method. I want you to test methods isValid & isUsernameValid one time with a valid data
and another time with an invalid data. As for method compare test it 3 times so you can get the 3
different possible outcomes.
Example to test the isUserNameValid method

For unlimited access to Homework Help, a Homework+ subscription is required.

Unlock all answers

Get 1 free homework help answer.
Already have an account? Log in
Already have an account? Log in
Already have an account? Log in
Already have an account? Log in
evelyn-6
evelyn-6Lv2
28 Apr 2021
Already have an account? Log in

Related questions

Weekly leaderboard

Start filling in the gaps now
Log in