3455276aa2
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1487 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
83 lines
1.3 KiB
Plaintext
83 lines
1.3 KiB
Plaintext
|
|
:- object(subjects).
|
|
|
|
:- info([
|
|
version is 1.0,
|
|
date is 2005/5/8,
|
|
author is 'Example by LPA; adapted to Logtalk by Paulo Moura.',
|
|
comment is 'General attributes & methods for all subjects.']).
|
|
|
|
:- public(print/0).
|
|
:- info(print/0, [
|
|
comment is 'Print complete timetable from the subject viewpoint.']).
|
|
|
|
print :-
|
|
nl, write('SUBJECT TIMETABLE ...'), nl, nl,
|
|
forall(extends_object(Subject, subject), Subject::print),
|
|
nl.
|
|
|
|
:- end_object.
|
|
|
|
|
|
:- object(subject).
|
|
|
|
:- info([
|
|
version is 1.0,
|
|
date is 2005/5/8,
|
|
author is 'Example by LPA; adapted to Logtalk by Paulo Moura.',
|
|
comment is 'General attributes & methods for all subjects.']).
|
|
|
|
:- public(print/0).
|
|
:- info(print/0, [
|
|
comment is 'Print complete timetable from the subject viewpoint.']).
|
|
|
|
print :-
|
|
self(Self),
|
|
write('SUBJECT: '), write(Self), nl,
|
|
forall(extends_object(Period, period), Period::print_subject(Self)),
|
|
nl.
|
|
|
|
:- end_object.
|
|
|
|
|
|
:- object(maths,
|
|
extends(subject)).
|
|
|
|
:- end_object.
|
|
|
|
|
|
:- object(music,
|
|
extends(subject)).
|
|
|
|
:- end_object.
|
|
|
|
|
|
:- object(french,
|
|
extends(subject)).
|
|
|
|
:- end_object.
|
|
|
|
|
|
:- object(prolog,
|
|
extends(subject)).
|
|
|
|
:- end_object.
|
|
|
|
|
|
:- object(biology,
|
|
extends(subject)).
|
|
|
|
:- end_object.
|
|
|
|
|
|
:- object('prolog++',
|
|
extends(subject)).
|
|
|
|
:- end_object.
|
|
|
|
|
|
:- object(accountancy,
|
|
extends(subject)).
|
|
|
|
:- end_object.
|