Thursday, July 15, 2010

package org.cs212.hello;

public class Book {

    String title;
    String author;
    Person person;

    public Book(String string) {
        this.title = string;
        this.author = "unknown author";
    }

    public void setPerson(Person p) {
        person = p;
    }

    public Person getPerson() {
        return person;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getTitle() {
        return title;
    }

}

No comments:

Post a Comment