In: Computer Science
draw a uml diagram for a class
Java Class:
class Person {
private String firstName;
private String lastName;
public Person(String aFirstName, String aLastName)
{
super();
firstName = aFirstName;
lastName = aLastName;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String aFirstName) {
firstName = aFirstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String aLastName) {
lastName = aLastName;
}
@Override
public String toString() {
return "Name : " +firstName + " "
+lastName;
}
}
UML for the above class
Note : If you like my answer please rate and help me it is very Imp for me