-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProduct.java
More file actions
57 lines (54 loc) · 1.58 KB
/
Product.java
File metadata and controls
57 lines (54 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
package day1;
public class Product {
String ProdName;
float Price;
double GST;
float Discount;
int Quantity;
public static void main(String[] args) {
Product P1=new Product();
P1.ProdName="Monitor";
P1.Price=20000;
P1.GST=2;
P1.Discount=6;
P1.Quantity=3;
System.out.println("Product Name : "+P1.ProdName);
System.out.println("Price: "+P1.Price);
System.out.println("GST : "+P1.GST);
System.out.println("Discount : "+P1.Discount);
System.out.println("Quantity : "+P1.Quantity);
Product P2=new Product();
P2.ProdName="Keyboard";
P2.Price=2000;
P2.GST=3;
P2.Discount=6;
P2.Quantity=6;
System.out.println("Product Name : "+P2.ProdName);
System.out.println("Price: "+P2.Price);
System.out.println("GST : "+P2.GST);
System.out.println("Discount : "+P2.Discount);
System.out.println("Quantity : "+P2.Quantity);
Product P3=new Product();
P3.ProdName="Mouse";
P3.Price=8640;
P3.GST=4;
P3.Discount=7;
P3.Quantity=8;
System.out.println("Product Name : "+P3.ProdName);
System.out.println("Price: "+P3.Price);
System.out.println("GST : "+P3.GST);
System.out.println("Discount : "+P3.Discount);
System.out.println("Quantity : "+P3.Quantity);
Product P4=new Product();
P4.ProdName="CPU";
P4.Price=18999;
P4.GST=4.76;
P4.Discount=17;
P4.Quantity=5;
System.out.println("Product Name : "+P4.ProdName);
System.out.println("Price: "+P4.Price);
System.out.println("GST : "+P4.GST);
System.out.println("Discount : "+P4.Discount);
System.out.println("Quantity : "+P4.Quantity);
}
}