Sunday, February 8, 2009

Objects in the Direct Clothing Case Study

/**Programmer Name: Besas, Jhovan C.
   Program Name: Direct Clothing Case Study
   Purpose: To apply knowledge that i have learned in OOP.
   Date: February 8, 2009
   Subect: Computer Programming 3
   Instructor: Dony Dongiapon**/

public class Customer{ Int CustomerID; String Name; String Address; int phoneNumber; String EmailAdd;

public Customer(int newcustomerID, string newname, String newAddress, int newPhoneNumber, string newEMail) { this.CustomerID=newcustomerID; this.Name=newname; this.Address=newAddress; this.phoneNumber=newPhoneNumber; this.EmailAddress=newEMail; }
public String displayInformation() { return String.format(CustomerID,Name,Address,phoneNumber,EmailAdd); } }


____________________________________________________________
public class Shirt { Int shirtID; double price; String color; String Sdescription; int Squantity;
public Shirt(int newID, double newprice, String newCcolor, String newdescription, int newquantity) { shirtID=newID; price=newprice; color=newCcolor; description=newdescription; quantity=newquantity; } Public shirt() { }public int addStock() { return quantity=quantity+stock; }
public int removeStock() { return quantity=quantity-stock; }
public String displayInformation() { return String.format("The following are the current information of the shirt"shirtID,price,color,description,quantity); } }


___________________________________________________
public class Order{ Int OrderID; double TotaPrice;; String status; public Order(int newID, double newTotalPrice, String newStatus) { OrderID=newID; TotalPrice=newTotalPrice; status=newStatus; }
public String displayInformation() { return String.format(OrderID,TotalPrice,status); } }

No comments:

Post a Comment