(1) Consider a class called Contact to use in a mobile phone contact list.
Draw a UML diagram for this class with three attributes of your choosing and accessor and mutator methods for each attribute. (use | and --- for the boxes)
(2) A program contains the following method definition:
public static char gender(int num)
{ char letter;
if(num == 1) letter = ‘m’;
else letter = ‘f’;
return letter;
}
Write a statement that passes 2 to this method and assigns its return value to a variable named sex.