cust

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;
}

}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s