Monday, February 9, 2009

Direct Clothing Case Study

/*Programmer: Pacalioga, Mark Jay
Program Name:Shirt class
Date Started: 02/09/09
Date Finished: 02/09/09
Program Purpose:To create a code for the purpose of our midterm exam.
*/

public class Shirt
{

private String shirtID;
private double price;
private String color;
private int quantity;
private String description;


public Shirt()
{
}

//constructor

public Shirt(String newshirtID,double newprice,String newcolor,int newquantity,String newdescription)
{
shirtid=newShirtID;
price=newprice;
color=newcolor;
quantity=newquantity;
description=newdescription;
}

//method

add stock void shirtid(String newShirtID)
{
shirtID=newShritID;
}

public void giveprice(double newprice)
{
price=newprice;
}

public double getprice(double newprice)
{
return price;
}

public void givecolor(String color)
{
color=newcolor;
}

public void getcolor(String color)
{
return color;
}

public void givequantity(int quantity)
{
quantity=newquantity;
}

public int getquantity(int quantity)
{
return quantity;
}

public void givedescription(String description)
{
description=newdescription;
}

public String(String description)
{
return description;
}

public String removestock()
{

}
}

Customer Class


public class Customer
{

private int CustomerID;
private String Name;
private String Address;
private int Phonenumber;
private String Emailaddress;

//constructor

public Customer()
{
}

public Customer(int c, String n, String a, int p, String e)

{
CustomerID=c;
Name=n;
Address=a;
Phonenumber=p;
Emailaddress=e;
}

//methods
public void customergreetings(String newname)
{
Name=newname;
System.out.println(" Welcome to Direct Clothing" "+name+");
}

public void customerprofile(String newname, int newid, String newaddress, int newphonenumber, String newemailaddress)
{
Name=newname;
Address=newaddress;
Customerid=newid;
Phonenumber=newphonenumber;
Emailaddress=newemailaddress;
System.out.println("customer's Profile");
System.out.println("Name: "+name+ "\nCustomer ID: "+customerid+"\nAddress:"+address+"\nPhone Number: "+phonenumber+"\nE-mail address: "+emailaddress);
}
}

Catalog Class


public class Customer
{

private int CustomerID;
private String Name;
private String Address;
private int Phonenumber;
private String Emailaddress;

//constructor

public Customer()
{
}

public Customer(int c, String n, String a, int p, String e)

{
CustomerID=c;
Name=n;
Address=a;
Phonenumber=p;
Emailaddress=e;
}

//methods
public void customergreetings(String newname)
{
Name=newname;
System.out.println(" Welcome to Direct Clothing" "+name+");
}

public void customerprofile(String newname, int newid, String newaddress, int newphonenumber, String newemailaddress)
{
Name=newname;
Address=newaddress;
Customerid=newid;
Phonenumber=newphonenumber;
Emailaddress=newemailaddress;
System.out.println("customer's Profile");
System.out.println("Name: "+name+ "\nCustomer ID: "+customerid+"\nAddress:"+address+"\nPhone Number: "+phonenumber+"\nE-mail address: "+emailaddress);
}
}

Order class


public class Order
{

//variable

private int orderID;
private double totalprice;
private String status;

//constuctor

public Order()
{
}

public Order(int orderID, double totalprice, String status)
{
}

//method

public void placeorder(int neworder, double newtotalprice, String newstatus)
{
orderid=neworder;
totalprice=newtotalprice;
status=newstatus;
}

public void removeorder(int order)
{
orderid=order;
System.out.println("Order number "+orderID+" has been remove");
}

public void submitorder()
{
System.out.println("Order number has been added "+orderid);
}

public void putorderonhold()
{
}
}

Order form class


public class FormofPayment
{
//variable declaration...

private int checknumber;
private int creditcardnumber;
private String expirationdate;

// constructor

public Formofpayment()
{
}

public FormofPayment(int c, int ccn, String e)
{
checknumber=c;
creditcardnumber=ccn;
expirationdate=e;
}

public void verifycreditcard()
{
System.out.println("Credit accepted!.");
}

public void verifycheckpayment()
{
System.out.println("pleasse verify your payment please");
}
}

No comments:

Post a Comment