Personal tools
You are here: Home → Comp 170 Introduction to OOP → Lab Materials → Lab7 → AuthorBook
Document Actions

AuthorBook

by Mit Patel — last modified 2006-03-02 03:54 PM

AuthorOfTheBookClass

Click here to get the file

Size 1 kB - File type text/plain

File contents

/**
 * Write a description of class BookAuthor here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class BookAuthor
{

    private String first;
    private String last;
    
    public void setFirst(String s) {
        first =s;
    }
    
    public void setLast(String s) {
        last =s;
    }
    
    public String getFirst() {
        return first;
    }
    
    public String getLast(){
        return last;
    }
    
    public String print(){
        return ("author is " +getFirst() + " " + getLast());
    }
   
}

« April 2026 »
Su Mo Tu We Th Fr Sa
1234
567891011
12131415161718
19202122232425
2627282930
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: