Slide 27
Slide 27 text
Draw the Class Diagram
package myModel.impl;
public class StudentImpl extends MinimalEObjectImpl.Container implements Student {
protected boolean hasScholarship = HAS_SCHOLARSHIP_EDEFAULT;
protected Computer computer;
@Override
public void setComputer(Computer newComputer) {
Computer oldComputer = computer;
computer = newComputer;
if (eNotificationRequired())
eNotify(new ENotificationImpl
(this, Notification.SET, MyModelPackage.STUDENT__COMPUTER, oldComputer, computer));
}
@Override
public Computer getComputer() {
if (computer != null && computer.eIsProxy()) {
InternalEObject oldComputer = (InternalEObject)computer;
computer = (Computer)eResolveProxy(oldComputer);
if (computer != oldComputer) {
if (eNotificationRequired())
eNotify(new ENotificationImpl
(this, Notification.RESOLVE, MyModelPackage.STUDENT__COMPUTER, oldComputer, computer));
}
}
return computer;
}
}
27