* Purpose:To apply Knowledge we learn from OOP
*Date :Feb 9,2009
*Instructor:Dony Dongiapon
*/
public class Catalog {
private int shirtID;
private int price;
private String color;
private String description;
public Catalog()
{
}
public Catalog(int s, int pri, String col, String des)
{
shirtID=s;
price=pri;
color=col;
description=des;
}
//add method
public void add(int newshirtID)
{
shirtID=newshirtID;
}
//remove method
public void remove(int newshirtID)
{
shirtID=newshirtID;
}
}
------------------------------------------------------------------------------------------
public class Customer{
private int customerid;
private String name;
private String address;
private int phonenumber;
private String emailaddress;
//constructor for customer
public Customer(){
}
public void customerprofile(String newname, int newid, String newaddress,int newphonenumber, String newemailaddress)
{
name=newname;
address=newaddress;
customerid=newid;
phonenumber=newphonenumber;
emailaddress=newemailaddress;
}
public void placeOrder()
{
}
public void cancelOrder()
{
}
}
------------------------------------------------------------------------------
public class Order{
private String orderID;
private double totalprice;
private String status;
public Order(){
}
public void orderShirt(String neworderID,double newtotalorderprice,String newstatus)
{
//constructor for order
orderID=neworderID;
totalorderprice=newtotalorderprice;
status=newstatus;
}
public void setOrderID(String neworderID)
{
String orderID=neworderID;
}
public String getOrderID()
{
return orderID;
}
//method for order
public void setTotaltorderprice(double newtotalorderprice)
{
totalorderprice=newtotalorderprice;}
public double getTotaltorderprice(){
return totalorderprice;
}
public void setStatus(String newstatus)
{
status=newstatus;}
public String getStatus()
{
return status;
}
}
--------------------------------------------------------------------------
public class Shirt {
//variable
private String shirtID;
private double price;
private String color;
private int quantity;
private String description;
public Shirt(){
}
public Shirt(String newshirtID,double newprice,String newcolor, int newquantity,String newdescription){
//constructor
shirtID= newshirtID;
price=newprice;
color= newcolor;
quantity=newquantity;
description=newdescription;
}
//method
public void setShirtID(String newshirtID){
shirtID= newshirtID; }
public String getShirtID()
{
return shirtID;}
public void setPrice(double newprice)
{
price=newprice;}
public double getPrice()
{
return price;}
public void setColor(String newcolor)
{
color= newcolor;}
public String getColor()
{
return color;}
public void setQuantity(int newquantity)
{
quantity=newquantity;}
public int getQuantity()
{
return quantity;}
public void setDescription(String newdescription)
{
description=newdescription;}
public String getDescription()
{
return description;}
//add method
public void add(int newshirtID)
{
shirtID=newshirtID;
}
//remove method
public void remove(int newshirtID)
{
shirtID=newshirtID;
}
-----------------------------------------------------------------------------
public class FormofPayment{
private String checknumber;
private String cardnumber;
private String expirationDate;
public FormofPayment(String c,String ca,String d)
//constructor{
checknumber=c;
cardnumber=ca;
expirationDate=d;
}
//method
public void setChecknumber(String check){
checknumber=c;
}
public String getChecknumber(){
return checknumber;
}
public void setCardnumber(String card){
cardnumber=ca;
}
public String getCardnumber(){
return cardnumber;
}
public void setExpirationdate(String date){
expirationDate=d;
}
public String getExpirationdate(){
returnexpirationDate;
}
public void Dispalymessage()
{
System.out.println("Your checknumber is:%s");
}
}