📄 ticketrequestbean.java
字号:
/*
* TicketRequestBean.java
*
* Created on July 9, 2002, 11:22 AM
*/
package com.samspublishing.jpp.ch23;
/**
*
* @author Stephen Potts
* @version
*/
public class TicketRequestBean implements java.io.Serializable
{
//information about the customer
private int custID;
private String lastName;
private String firstName;
//information about the cruise
private int cruiseID;
private String destination;
private String port;
private String sailing;
private int numberOfTickets;
private boolean commissionable;
private boolean approved;
public TicketRequestBean()
{
}
/** Constructor */
public TicketRequestBean(int custID, String lastName, String firstName,
int cruiseID, String destination,
String port, String sailing, int numberOfTickets,
boolean isCommissionable)
{
//set the information about the customer
this.custID = custID;
this.lastName = lastName;
this.firstName = firstName;
//set the information about the cruise
this.cruiseID = cruiseID;
this.destination = destination;
this.port = port;
this.sailing = sailing;
this.numberOfTickets = numberOfTickets;
this.commissionable = commissionable;
this.approved = false;
}
public int getCustID()
{
return this.custID = custID;
}
public String getLastName()
{
return this.lastName = lastName;
}
public String getFirstName()
{
return this.firstName = firstName;
}
public int getCruiseID()
{
return this.cruiseID;
}
public String getDestination()
{
return this.destination;
}
public String getPort()
{
return this.port;
}
public String getSailing()
{
return this.sailing;
}
public int getNumberOfTickets()
{
return this.numberOfTickets;
}
public boolean isCommissionable()
{
return this.commissionable;
}
public boolean isApproved()
{
return this.approved;
}
public void setCustID(int custID)
{
this.custID = custID;
}
public void setLastName(String lastName)
{
this.lastName = lastName;
}
public void setFirstName(String firstName)
{
this.firstName = firstName;
}
public void setCruiseID(int cruiseID)
{
this.cruiseID = cruiseID;
}
public void setDestination(String destination)
{
this.destination = destination;
}
public void setPort(String port)
{
this.port = port;
}
public void setSailing(String sailing)
{
this.sailing = sailing;
}
public void setNumberOfTickets(int numberOfTickets)
{
this.numberOfTickets = numberOfTickets;
}
public void setCommissionable(boolean commissionable)
{
this.commissionable = commissionable;
}
public void setApproved(boolean approved)
{
this.approved = approved;
}
public String toString()
{
String outString;
outString = "-------------------------------------------" + "\n";
//information about the customer
outString += "custID = " + this.custID + "\n";
outString += "lastName = " + this.lastName + "\n";
outString += "firstName = " + this.firstName + "\n";
outString += "-----------------------------------------" + "\n";
//information about the cruise
outString += "cruiseID = " + this.cruiseID + "\n";
outString += "destination = " + this.destination + "\n";
outString += "port = " + this.port + "\n";
outString += "sailing = " + this.sailing + "\n";
outString += "numberOfTickets = " + this.numberOfTickets + "\n";
//information about the status
outString += "commissionable = " + this.commissionable + "\n";
outString += "approved? = " + this.approved + "\n";
outString += "-----------------------------------------" + "\n";
return outString;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -