This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/Logtalk/examples/lpa/timetables/subjects.lgt
pmoura 3455276aa2 Logtalk 2.26.2 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1487 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2005-12-24 18:07:41 +00:00

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.