-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainClass.java
More file actions
37 lines (26 loc) · 920 Bytes
/
MainClass.java
File metadata and controls
37 lines (26 loc) · 920 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
32
33
34
35
36
37
package OOPS;
public class MainClass {
public static void main(String[] args) {
Product product = new Product();
product.setProductDetails("IPhoneX", 101, 1_10_000);
product.showProductDetails();
System.out.println();
Product product2 = new Product();
product2.productName = "Samsung Note 10";
product2.productID = 102;
product2.productPrice = 1_20_000;
product2.showProductDetails();
System.out.println();
// LEDTV
LEDTV ledtv = new LEDTV();
// Product ledtv = new LEDTV(); // if i use this, then I won't use new two parameters
ledtv.setProductDetails("SONY LED TV", 201, 56_000, "SONY", "4K");
ledtv.showProductDetails();
System.out.println();
// MOBILE
MOBILE mobile = new MOBILE();
mobile.setCompanyCEO("Saon Srabon");
mobile.setProductDetails("Xiaomi", 301, 40_000, 6, "Android", 128);
mobile.showProductDetails();
}
}