-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBook.java
More file actions
56 lines (43 loc) · 1.75 KB
/
Book.java
File metadata and controls
56 lines (43 loc) · 1.75 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
48
49
50
51
52
53
54
55
56
import java.io.*;
import java.util.*;
public class Book
{
String btitle;
int bid;
String bpub[] = {"Technical Publication","Gurudev Publication Pvt. Ltd.","Young Mind Prints","ISRO Publication Ltd."};
void booksearch()
{
String type[] = {"Technical Book","Mythology Book","Novel","Sci-Fi Book"};
if(bid == 1001 || bid == 1002 || bid == 1003 || bid == 1004 || bid == 1005 || bid == 1006 || bid == 1007 || bid == 1008 || bid == 1009 || bid == 1010 )
{
System.out.println("Book Type : "+type[0]);
System.out.println("Publication : "+bpub[0]);
}
else if (bid == 1011 || bid == 1012 || bid == 1013 || bid == 1014 || bid == 1015 || bid == 1016 || bid == 1017 || bid == 1018 || bid == 1019|| bid == 1020)
{
System.out.println("Book Type : "+type[1]);
System.out.println("Publication : "+bpub[1]);
}
else if(bid == 1021 || bid == 1022 || bid == 1023 || bid == 1024 || bid == 1025 || bid == 1026 || bid == 1027 || bid == 1028 || bid == 1029 || bid == 1030)
{
System.out.println("Book Type : "+type[2]);
System.out.println("Publication : "+bpub[2]);
}
else
{
System.out.println("Book Type : "+type[3]);
System.out.println("Publication : "+bpub[3]);
}
}
public static void main(String args[])
{
Book b = new Book();
b.btitle = "Java Programing";
b.bid = 1009;
System.out.println();
System.out.println("Book Title :"+b.btitle);
System.out.println("Book ID : "+b.bid);
b.booksearch();
System.out.println();
}
}