forked from sam-tripathi/Defeat-JAVA
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPublisher.java
More file actions
31 lines (28 loc) · 772 Bytes
/
Publisher.java
File metadata and controls
31 lines (28 loc) · 772 Bytes
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
public class Publisher {
String title;
String authorname;
String publisher;
int nop;
int price;
//Publisher publisher[]=new Publisher[5];
//publisher=sc.nextLine();
Publisher()
{
}
Publisher(String title, String authorname, String publisher,int nop, int price)
{
this.title=title;
this.authorname=authorname;
this.publisher=publisher;
this.nop=nop;
this.price=price;
}
void DisplayBook()
{
System.out.println("Title:"+title);
System.out.println("Author name:"+authorname);
System.out.println("Publisher:"+publisher);
System.out.println("No of pages:"+nop);
System.out.println("Price:"+price);
}
}