Array2 - } public void setISBN(String i) { ISBN = i; }...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.util.*; class Book { static Scanner console = new Scanner(System.in); public static void main(String[]args) private String author; private String ISBN; { Book(String a, String i) { author = "Jenkins" ISBN = "CAU222" } public void setAuthor(String a) { author = a; } public String getAuthor(String a) { return author;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } public void setISBN(String i) { ISBN = i; } public String getISBN(String i) { return ISBN; } Book one = new Book[20]; for(int x = 0;x<one.length;x++) one[x] = new Book(1001 + x,1); for(int x = 0;x<one.length;x++) System.out.println(one[x].getAuthor() + " " + one[x].getISBN()); }}...
View Full Document

This note was uploaded on 10/04/2010 for the course COMPUTER S 106 taught by Professor Moore during the Spring '08 term at Clark Atlanta.

Ask a homework question - tutors are online