REQUISITOS E O MODELO DE USE CASES

O MODELO DE ANÁLISE (DE DOMÍNIO)

O BUSINESS PACKAGE

O GUI PACKAGE

O MODELO DE DESIGN

O PROJETO DA ARQUITETURA

O DATABASE PACKAGE

O BUSINESS OBJECTS PACKAGE

O USER INTERFACE PACKAGE

O PROJETO DA INTERFACE DO USUÁRIO

IMPLEMENTAÇÃO

//
//  Unified Library Application
//  Case study in Unified Modeling Language Toolkit
//
//  Loan.java: represents a loan. The loan refer to one
//  title and one borrower.
//
//  Copyright (c) 1998 John Wiley & Sons, Inc. All rights reserved.
//  Reproduction or translations of this work beyond that permitted
//  in Section 117 of the 1976 United States Copyright Act without
//  the express written permission of the copyright owner is unlawful.
//  Requests for further information should be addressed to Permissions
//  Department, John Wiley & Sons, Inc. The purchaser may make back-up
//  copies for his/her own use only and not for distribution or resale.
//  The Publisher assumes no responsibility for errors, omissions, or
//  damages, caused by the use of these programs of from the use of the
//  information contained herein.

package bo;
import util.ObjId;
import db.*;
import java.io.*;
import java.util.*;

public class Loan extends Persistent {
    private ObjId item;
    private ObjId borrower;
    public Loan(){
    }
    public Loan(ObjId it, ObjId b) {
        item = it;
        borrower = b;
    }
    public BorrowerInformation getBorrower() {
        BorrowerInformation ret =
            (BorrowerInformation) Persistent.getObject(borrower);
        return ret;
    }
    public String getTitleName() {
        Item it = (Item) Persistent.getObject(item);
        return it.getTitleName();
    }
    public Item getItem() {
        Item it = (Item) Persistent.getObject(item);
        return it;
    }
    public int getItemId() {
        Item it = (Item) Persistent.getObject(item);
        return it.getId();
    }
    public void write(RandomAccessFile out)
       throws IOException {
        item.write(out);
        borrower.write(out);
    }
    public void read(RandomAccessFile in)
        throws IOException {
        item = new ObjId();
        item.read(in);
        borrower = new ObjId();
        borrower.read(in);
    }
}

caso3.htm programa anterior