Section 12.13. Exercises


12.13. Exercises

1.

Imagine a public library. Carry out the CRC nomination process for a system to track library members and the collection. What list of objects do you come up with? What abstract classes do you find? Which did you discard and why?

2.

Extend the purpose of the library program to include generating mailings to members with overdue materials. Did you add classes? Did you add methods and/or members? To which classes did you add them?

Example 12.2. The User class
 package net.multitool.core; import net.multitool.util.*; import java.util.*; public class User {   private String name;   private Account home;      // TODO: implement   public   User(String username)   {     name = username;   }   public String   toString()   {     return name;   } } // class User 

3.

A new requirement is added. The system must allow for books, audio recordings, and movies to be checked out for different lengths of time. Did you add classes? Did you add methods and/or members? To which classes did you add them?



    Java Application Development with Linux
    Java Application Development on Linux
    ISBN: 013143697X
    EAN: 2147483647
    Year: 2004
    Pages: 292

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net