-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBook.java
More file actions
48 lines (35 loc) · 1.33 KB
/
Book.java
File metadata and controls
48 lines (35 loc) · 1.33 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
/**********************************************************************************************************************************
* MADE BY AMNA *
*********************************************************************************************************************************/
package miniproject;
public class Book {
private String bTitle;
private int bPubYear;
private double bPrice;
/* public Book(String Title, double Price, int PubYear){ //constructor
bTitle = Title;
bPubYear = PubYear;
bPrice = Price;}
*/
public void setbTitle(String newbTitle){ //set methods
bTitle = newbTitle;
}
public void setbPubYear(int newbPubYear){
bPubYear = newbPubYear;
}
public void setbPrice(double newbPrice){
bPrice = newbPrice;
}
public String getbTitle(){ //get methods
return bTitle;
}
public int getbPubYear(){
return bPubYear;
}
public double getbPrice(){
return bPrice;
}
public void display(){ //Display method
System.out.printf("Book title: %s%nBook price: %f%n Publish Year: %d%n",bTitle, bPrice, bPubYear );
}
}