⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 textbook.java

📁 The program is used for Classroom Scheduling for tutors and students. It contain gui tools for mana
💻 JAVA
字号:
/**
 *  Classroom Scheduler
 *  Copyright (C) 2004 Colin Archibald, Ph.D.
 *  https://sourceforge.net/projects/cr-scheduler/
 *
 *  Licensed under the Academic Free License version 2.0
 */

package resources;
import java.io.*;
/**
 *
 * @author  Colin
 */
public class Textbook implements Constants, Comparable, Serializable {
    
    private String title = "";
    private String edition = "";  
    private String author = "";
    private String publisher = "";
    private String year = "";
    private String isbn = "";
    
    /** Creates a new instance of Textbook */
    public Textbook(String title, String edition, String author,
       String publisher, String year, String isbn) {
                        
        this.title = title;
        this.edition = edition;
        this.author = author;
        this.publisher = publisher;
        this. year = year;
        this.isbn = isbn;
    }
    public String getTitle(){
        return title;
    }
    public String getEdition (){
        return edition;
    }
    public String getAuthor(){
        return author;
    }
    public String getPublisher(){
        return publisher;
    }
    public String getYear(){
        return year;
    }
    public String getISBN(){
        return isbn;
    }
    public boolean equals(Object obj) {        
        if (!(obj instanceof Textbook)){
            return false;
        }
        
        if (title.equals( ((Textbook)obj).title) &&
            isbn.equals( ((Textbook)obj).isbn))
            return true;
        return false;
    }
    
    public String toString() {
        return title + ", " + edition + ", " + author + ", " 
            + publisher + ", " + year + ". " + isbn;
    }
    
    // todo Make the books sortable
    public int compareTo(Object obj) {
        return 0;
    }
    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -