exercise_1.md 696 字节
Newer Older
Y
Yuan Yuan 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
# 题目1


#### 题目1

创建一个Book类,Book类的属性如下:

| 属性名      | 类型     | 说明         |
| ----------- | -------- | ------------ |
| id          | int      | 书的id       |
| bookName    | String   | 书名         |
| type        | BookType | 书的类型     |
| borrowTimes | int      | 书的借阅次数 |
| pages       | int      | 书的页码     |
| price       | double   | 书的价格     |

注意:这些属性都是private权限


## 答案

```java
public class Book {
    private int id;
    private String bookName;
    private BookType type;
    private int borrowTimes;
    private int pages;
    private double price;
}

```

## 选项