Permalink
Browse files

Added Object class knowledge and made it a subclass of string and has…

…hmap
  • Loading branch information...
1 parent 8eb04d3 commit f5ed52fb0f219defb394281d52e60b042c7173da @Zeroe31890 committed May 2, 2012
Showing with 9 additions and 2 deletions.
  1. +9 −2 hw4.pl
View
11 hw4.pl
@@ -3,20 +3,27 @@
instance(_, string).
instance(_, hashmap).
-instance(_, abstractmap).
instance(_, int).
-subclass(abstractmap, hashmap).
+subClass(abstractmap, hashmap).
+subClass(object, abstractmap).
+subClass(object, string).
hasMethod(string, length).
hasMethod(string, println).
hasMethod(string, charAt).
hasMethod(string, equals).
hasMethod(string, indexOf).
+hasMethod(object, finalize).
+hasMethod(object, getClass).
+hasMethod(object, notify).
+hasMethod(object, wait).
+
hasMethod(abstractmap, hashCode).
hasMethod(abstractmap, toString).
+
hasMethod(hashmap, size).
hasMethod(hashmap, isEmpty).
hasMethod(hashmap, hashCode).

0 comments on commit f5ed52f

Please sign in to comment.