package com.ilp;
public class Cust {
private String custname=”Hari”;
private String custid=”H87″;
private int notp; //number of tour packages
private int nors; //number of room services
private double ltpoints; //loyalty points
private double pp;//package price
private double fp; // final price
private boolean disc=false;
public String getCustname() {
return custname;
}
public void setCustname(String custname) {
this.custname = custname;
}
public String getCustid() {
return custid;
}
public void setCustid(String custid) {
this.custid = custid;
}
public int getNotp() {
return notp;
}
public void setNotp(int notp) {
this.notp = notp;
}
public int getNors() {
return nors;
}
public void setNors(int nors) {
this.nors = nors;
}
public double getLtpoints() {
return ltpoints;
}
public void setLtpoints(double ltpoints) {
this.ltpoints = ltpoints;
}
public double getPp() {
return pp;
}
public void setPp(double pp) {
this.pp = pp;
}
public double getFp() {
return fp;
}
public void setFp(double fp) {
this.fp = fp;
}
public boolean isDisc() {
return disc;
}
public void setDisc(boolean disc) {
this.disc = disc;
}
public void printCustDetails()
{
System.out.println(“The name of the customer is”+ custname);
System.out.println(“The customer ID is”+custid);
}
public double printLtPoints(int notp, int nors)
{
ltpoints= notp*200+nors*100;
return ltpoints;
}
public double calculateDiscount(double pp)
{
if(ltpoints>50 && ltpoints300 && ltpoints600)
{
fp=pp-(0.10*pp);
disc=true;
}
else
{
fp=pp;
disc=false;
}
return fp;
}
public double resetLtPoints()
{
if(disc=true)
{
ltpoints=0;
}
return ltpoints;
}
}