Professional Documents
Culture Documents
// calling
void calculateDebit() {
this.remainingDebit = Fees - totalCredit;
}
void payment(double lastcre ,String lastpay) {
this.lastCredit = lastcre;
this.lastPayDate = lastpay;
this.totalCredit += lastCredit;
calculateDebit();
}
Finance(){
this.Sem =0;
this.Session = "";
this.lastPayDate = "";
this.totalCredit = 0;
this.lastCredit = 0;
this.Fees = 0;
this.remainingDebit = 2000.00;
}
Finance(int s,String ses,double fee,String lastpay,double lastcre){
this.Sem=(byte)s;
this.Session=ses;
this.Fees=fee;
this.lastPayDate=lastpay;
this.lastCredit=lastcre;
payment(lastcre, lastpay);
calculateDebit();
}
void setSem(int s) {
this.Sem=(byte)s;
}
void setSession(String ses) {
this.Session=ses;
}
void setFees(double fee) {
this.Fees=fee;
}
void setlastPayDate(String lastpay) {
this.lastPayDate=lastpay;
}
void setlastCredit(double lastcre) {
this.lastCredit=lastcre;
}
void print() {
System.out.println("Sem: "+Sem+" "+"Session: "+Session);
System.out.println("Fees: "+Fees+" "+"Remaining: "+remainingDebit);
System.out.println("Last Payment: "+lastCredit+" on "+lastPayDate);
}
package lab3;
/* Created by Pg Mad Sariy'Nis
* BI18110127
* Lab3
* @Copyrighted */
System.out.println();