/*** PRogrammer: Ana Mae Respecia
Name of Programm: Catalog Class (Case study of direct Clothing)
Date Strated : January 6,2009
Date Ended: January 8,2009
Purpose: To run a solution for the direct clothing order ***/
public class Catalog
{
/** declaring my variables
private int shirtid;
private String color;
private double price;
private int quantityinstock;
private String description;
//costructor declaration
public Catalog()
{
}
public Catalog(int s, double p, String d,String c, int q)
{
shirtid=s;
color=c;
price=p;
description=d;
quantityinstock=q;
}
public void addshirtStock(int newshirtid, double newprice, String newcolor, String newdescription, int newquantityinstock)
{
shirtid=newshirtid;
price=newprice;
color=newcolor;
description=newdescription;
quantityinstock=newquantityinstock;
System.out.println("Shirt number: "+shirtid+ "\nPrice: "+price+"\nColor: "+color+"\nDescription: "+description+"\nQuantity in Stock: "+quantityinstock);
System.out.println("Successful adding");
}
}
public void removeashirtStock(int newshirtid)
{
shirtid=newshirtid;
System.out.println("The Shirt number"+shirtid+"is succesfully removed from the order");
}
}
/*** PRogrammer: Ana Mae Respecia
Name of Programm: Shirt Class (Case study of direct Clothing)
Date Strated : January 6,2009
Date Ended: January 8,2009
Purpose: To run a solution for the direct clothing order ***/
public class Shirt
{ // declaring variables
public int shirtID;
private double price;
private String color;
private String description;
private int quantity;
public Shirt(int newshirtID, double newprice, String newcolor, String newdescription, int newquantity)
{
shirtID=newshirtID;
price=newprice;
color=newcolor;
description=newdescription;
quantity=newquantity;
}
public void addorder(int newshirtid) // constrcutor for adding order
{
shirtid=newshirtid;
System.out.println("You added Shirt number "+shirtid+" to your order");
}
public void cancelorder(int newshirtid)
{
shirtid=newshirtid;
System.out.println("Shirt number " +shirtid+ "is cancelled from your orders");
}
/*** PRogrammer: Ana Mae Respecia
Name of Programm: Class for Format of Payements (Case study of direct Clothing)
Date Strated : January 6,2009
Date Ended: January 8,2009
Purpose: To run a solution for the direct clothing order ***/
public class FormofPayment
{
private int checknum;
private int cardnum;
private String expiredate;
public FormOfPayment(); // constructor
{
}
public FormofPayment(int newcnum,int newcdnum,String newexdate)
{
checknum=newcnumo;
cardnum=newcdnum;
expiredate=newexdate;
}
public String verifyCardno(int newcardno)
{
if(cardno==newcdnum){
cardum=newcdnum;
return String.format("Your credit card number is verified!");}
{
else{
Sting.format("Invalid CardNumber pls check")
return String.Format()
}
public String verifyChekPayment(int newcheckno)
{
if(checknum==newcnum){
checknum=newcnum;
return String.format("Your check number is verified!");}
{
else{
Sting.format("Check number not verified system error pls check")
return String.Format()
}
}
/*** PRogrammer: Ana Mae Respecia
Name of Programm: Class for Order(Case study of direct Clothing)
Date Strated : January 6,2009
Date Ended: January 8,2009
Purpose: To run a solution for the direct clothing order ***/
public class Order{
// declaring variables
private int orderid;
private double totalprice;
private String status;
// constructor
public order ();
{
}
public Order(int neword, double newTp, String newstat)
{
orderid=ord;
totalprice=tp;
status=stat;
}
//Method
{
public void cancelorder()
{
orderid=ord;
System.out.print("Order is cancled"+ord);
}
public void addorder();
{
System.out.println("The order is added"+ord0;
}
}
Sunday, February 8, 2009
Subscribe to:
Posts (Atom)