Current location - Training Enrollment Network - Books and materials - Do you know the structure of books?
Do you know the structure of books?
Package com.hua.excel;

Public class library {

private int id

Private string name;

Private brochette shop;

Private int number;

//Two construction methods

//No reference

Public Library () {

}

//Four parameters

public library(int id,String name,String shop,int num) {

this.id = id

this.name = name

this.shop = shop

this.num = num

}

//Enter the book information

public void inputBook(int id,String name,String shop){

this.id = id

this.name = name

this.shop = shop

}

//output information of three books

public int getId() {

Return id;

}

Public string getName() {

Returns the name;

}

Public string getShop() {

Return shop;

}

//Modify inventory

public void setNum(int num) {

this.num = num

}

}