-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAAAAG_productAndCustomer.java
More file actions
75 lines (60 loc) · 1.58 KB
/
AAAAG_productAndCustomer.java
File metadata and controls
75 lines (60 loc) · 1.58 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
class product
{
public String itemno;
public String name;
public double price;
public int quan;
public void setItemno(String s)
{
itemno = s ;
}
public void setName(String x)
{
name= x ;
}
public double getPrice()
{
return price;
}
public double getQuan()
{
return quan;
}
public product()
{
itemno = "0" ;
name = "0" ;
price = 0 ;
quan = 0 ;
}
public product(String x, String y, double z ,int q)
{
itemno = x;
name = y;
price = z;
quan = q;
}
}
public class AAAAG_productAndCustomer {
public static void main(String [] arg)
{
product s = new product();
System.out.println("item no : "+s.itemno);
System.out.println("name : "+s.name);
System.out.println("price : "+s.price);
System.out.println("quantity : "+s.quan);
product s2 = new product("Az21","Sarthak rastogi",2300.0,5);
System.out.println();
System.out.println("item no : "+s2.itemno);
System.out.println("name : "+s2.name);
System.out.println("price : "+s2.price);
System.out.println("quantity : "+s2.quan);
System.out.println();
s.setItemno("AAZ");
s.setName("ankur kumar");
System.out.println("item no : "+s.itemno);
System.out.println("name : "+s.name);
System.out.println("price : "+s.price);
System.out.println("quantity : "+s.quan);
}
}