public void MakeCall(GSM receiver, double duration) { if (Call.IsDurationValid(duration)) { if (this.SimMobileNumber != receiver.SimMobileNumber) { if (this.HasSimCard && receiver.HasSimCard) { Call newcall = new Call(this, receiver, duration); this.LastOutgoingCall = newcall; receiver.LastIncomingCall = newcall; this.OutgoingCallsDuration += duration; } } } }
public Call(GSM caller, GSM receiver, double duration) { this.Caller = caller; this.Receiver = receiver; this.Duration = duration; }