package com.ilp;

public class Main {

/**
* @param args
*/
public static void main(String[] args) {

Cust c1 = new Cust();
c1.printCustDetails();
c1.printLtPoints(2,0);
System.out.println(“your total loyalty points:” +c1.getLtpoints());
c1.calculateDiscount(12000);
System.out.println(“the price after discount:” +c1.getFp());
System.out.println(“your tour has been booked”);
c1.resetLtPoints();
System.out.println(“your NEW loyalty points:”+ c1.getLtpoints());

}

}

Advertisements

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

}

A New Journey!

Its been a while since I wrote a post. Not that I’ve been busy or something, but that nothing much has been going around lately.

Just when I got sick of the gym routine and tv shows, I got my joining letter at Tata Consultancy Services. And it didn’t disappoint me because they’ve given a new location for me to go and re-learn those mad IT skills again.

Although, I’m a bit worried about how much useful my broken Hindi is gonna be, I can’t deny that I’m excited. Frankly, I’ve never lived anywhere for more than a week other than Chennai or Bangalore.

And to tread in an unknown place is always gonna be good.

Looking forward to the train journey and I hope IRCTCs random seat arrangement (for once) gives me some good company!