-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathitems.java
More file actions
61 lines (56 loc) · 1.75 KB
/
Copy pathitems.java
File metadata and controls
61 lines (56 loc) · 1.75 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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplication3;
import java.time.LocalDate;
/**
*
* @author lenovo
*/
public class items {
double cost, selling_price;
String barcode_no, production_date;
private String feedback_status;
int amount,PAO;
String expiring_date;
public items(double cost,double selprice,int amount ,String barcode,String production,int PAO)
{
this.amount=amount;
this.barcode_no=barcode;
this.cost=cost;
this.selling_price=selprice;
this.production_date=production;
this.PAO=PAO;
this.expiring_date= cal_expire_date();
}
public items(items t)
{
this.amount=t.amount;
this.barcode_no=t.barcode_no;
this.cost=t.cost;
this.selling_price=t.selling_price;
this.production_date=t.production_date;
this.expiring_date=t.expiring_date;
this.PAO=t.PAO;
this.feedback_status=t.feedback_status;
}
public String cal_expire_date()
{
LocalDate production = LocalDate.parse(this.production_date);
// Displaying date
//System.out.println("Date : "+production);
// Add n months to the date
LocalDate expiring = production.plusMonths(this.PAO);
//System.out.println("New Date : "+expiring);
String e=expiring.toString();
return e;
}
public String getFeedback_status() {
return feedback_status;
}
public void setFeedback_status(String feedback_status) {
this.feedback_status = feedback_status;
}
}