;;;; -*- mode:Lisp; syntax:Common-Lisp; package:user -*- ;;;;
;;;; Copyright 1992 Patrick H. Winston.  All rights reserved.
;;;; Version 1.1.1, transferred from master disk on 23 Apr 93
;;;;
;;;; This file may reference other files containing copyrighted software.
;;;; Any restrictions on the use of such software are described in the
;;;; files containing that software.  This file may be freely copied as
;;;; long as this notice is kept intact.

;;;; Purpose: program support for Chapter 9, Frames and Inheritance

;;;; LOAD MICRO-CLOS SYSTEM (remove if your Lisp contains CLOS)
#-:clos
(load "clos.lsp")

;;;; LOAD DWARFS TEST DATA
(load "frames.lsp")	;See warning in frames.txt.

;;;; RUN TESTS

(format t "~%Jacque's personality is ~a." (personality jacque))

(format t "~%Crazy's personality is ~a." (personality crazy))

(format t "~%Jacque's hobby is ~a." (hobby jacque))

(format t "~%Crazy's hobby is ~a." (hobby crazy))

(format t "~%Blimpy's appetite is ~a." (appetite blimpy))

(format t "~%Blimpy's physique ~a." (physique blimpy))

(format t "~%Jacque's appetite is ~a." (appetite jacque))

(setf (physique jacque) 'muscular)

(format t "~%Now Jacque's appetite is ~a." (appetite jacque))

(format t "~%The size of a typical dwarf, viewed as a typical person, is ~a." 
	(size typical-dwarf typical-person))

(format t "~%The size of a typical dwarf, viewed as a typical dwarf, is ~a." 
	(size typical-dwarf typical-dwarf))

(format t "~%The mood of Patrick, viewed as a mountain hiker, is ~a."
	(mood patrick mh))

(format t "~%The mood of Patrick, viewed as a air travelor, is ~a."
	(mood patrick at))

(setf earthquake
      (make-instance 'earthquake
		     :instant "3:45"
		     :day "today"
		     :place "Lower Slabovia"
		     :damage "500,000,000"
		     :fatalities "25"
		     :magnitude "8.5"
		     :fault "Sadie Hawkins"
		     ))

(format t "~
	~%An earthquake occurred ~a in ~a.~
	~%There were ~a fatalities and $~a in property damage.~
	~%The magnitude was ~a on the Richter scale;~
	~%the fault involved was the ~a."
	(day earthquake)
	(place earthquake)
	(fatalities earthquake)
	(damage earthquake)
	(magnitude earthquake)
	(fault earthquake))




