/** * Write a description of class Book here. * * @author (Michael Clark) * @version (30th October 2012, version 0.1) */ public class Book { // instance variables - replace the example below with your own private int id; private String author; private String title; private boolean isFiction; /** * Constructor for objects of class Book */ public Book(String title, String author, int id, boolean isFiction) { // initialise instance variables this.id = 0; this.author = author; this.title = title; this.isFiction = false; } /** * Get the name of the book Author. * */ public String getAutor() { // put your code here return this.author; } /** * Get the book ID. */ public int getId() { return this.id; } /** * Get the book title. * */ public String getTitle() { return this.title; } public void setAuthor(String authorName) { author = authorName; } public void setId(int bookId) { id = bookId; } public void setTitle(String bookTitle) { title = bookTitle; } }
This is the book Class, every time i click on compile, it goes into an infinite compilation.
import java.util.ArrayList; /** * This Class would hold Membership details for the Library. * * @author (Michael Clark) * @version (30th October 2012, version 0.1) */ public class Member { // instance variables - These are member object attributes/fields private String firstName; private String lastName; private String phoneNumber; private int refNumber; /** * Constructor for objects of class Member */ public Member(String firstName, String lastName, String phoneNumber, int refNumber) { this.firstName = firstName; this.lastName = lastName; this.phoneNumber = phoneNumber; this.refNumber = refNumber; } /** * This is return method for the object firstname. * */ public String getfirstName() { return this.firstName; } /** * Return method for the last name. */ public String getlastName() { return this.lastName; } /** * Return method for the phone number. */ public String getPhoneNumber() { return this.phoneNumber; } /** * Return method for membership reference. */ public int getrefNumber() { return this.refNumber; } }