FE1.2 Lab
FE1.2 Lab
FE1.2 Lab
// main method
public static void main(String[] args) {
System.out.println("\nBook 1 : \n"+b1);
System.out.println("\nBook 2 : \n"+b2);
}
}
// instance variables
// constructor
return year;
// return monthname
String months[] =
{"","January","February","March","April","May","June","July","August","September","
October","November","December"};
return months[month];
}
// instance variables
// constructor
// instance variables
// constructor
this.name = name;
this.address = address;
// instance variables
// constructor
public Book(String author, String title, int day, int month, int year, String
pubname, int number, String city, String country ){
this.author = author;
this.title = title;
this.pubDate = date;
// check checkBookAge
public int checkBookAge() {
return 1;
// else return 0
else {
return 0;