Santa Claus allegedly keeps lists of those who are naughty and those who are nice. On the naughty list are the names of those who will get coal in their stockings. On the nice list are those who will receive gifts. Each object in this list contains a name (an instance of Name, as defined in Listing B-1 of Appendix B) and a list (an instance of an ADT list) of that person’s gifts. Design an ADT for the objects in the nice list. Specify each ADT operation by stating its purpose, by describing its parameters, and by writing preconditions, postconditions, and a pseudocode version of its header. Write a Java interface for the ADT that includes javadoc-style comments. Then implement this ADT using an instance of Array List for the list of gifts. Design and implement a class Santa Claus that maintains the naughty and nice lists. Write a program that demonstrates this class.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here