Skip to content

Instantly share code, notes, and snippets.

@andrewfree
Created March 7, 2011 23:44
Show Gist options
  • Save andrewfree/859535 to your computer and use it in GitHub Desktop.
Save andrewfree/859535 to your computer and use it in GitHub Desktop.
public class Book{
private int numPages=0;
private float price=0.0f;
private String author="";
private String title="";
private boolean checkedOut=false;
public Book(int a,float b,String c,String d){
numPages=a;
price=b;
author=c;
title=d;
}
public boolean getCheckedOut(){
return checkedOut;
}
public String getTitle(){
return title;
}
public int getNumPages(){
return numPages;
}
public float getPrice() {
return price;
}
public String getAuthor(){
return author;
}
public void setPrice(float z) {
price=z;
}
public void setCheckedOut(boolean a) {
checkedOut=a;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment