Question: param loc - the desired location to set * * The below validation should be performed: * * - If the parameter loc is null,

param loc - the desired location to set
*
* The below validation should be performed:
*
*- If the parameter loc is null, the location should be set to "Home"
*
*- If the parameter loc contains no characters, the location should be set to "Home"
*
*- If the parameter loc contains more than 20 characters, the location should be set
* to the first 20 characters of loc.
*
*- The location must begin with an upper case character.
*/
public void setLocation(String loc){
// To be completed

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!