-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
37 lines (24 loc) · 768 Bytes
/
Copy pathMain.java
File metadata and controls
37 lines (24 loc) · 768 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 oopIntro;
public class Main {
public static void main(String[] args)
{
Product product1 = new Product(1,"Lenovo V14", 15000, "16 GB Ram", 10, 13500);
Product product2 = new Product();
product2.setId(2);
product2.setName("Lenovo V15");
product2.setDetail("32 GB Ram");
product2.setDiscount(10);
product2.setUnitPrice(16000);
double x = product2.getUnitPriceAfterDiscount();
System.out.println(x);
Product product3 = new Product();
Category category1 = new Category();
category1.setId(1);
category1.setName("Ýçecek");
Category category2 = new Category();
category2.setId(2);
category2.setName("Yiyecek");
System.out.println(category1.getName());
System.out.println(category2.getName());
}
}