/*Programmer: Gerlie O. Lidon
Date started: Feb 7, 2009
Date ended: Feb 8, 2009
Program name:catalog
Program purpose: To create a solution for direct clothing
*/
public class Catalog
{
//variable declaration
private int ShirtID;
private double Price;
private String Color;
private String Description;
private int Quantityinstock;
//costructor declaration
public Catalog()
{
}
public Catalog(int s, double p, String c, String d, int q)
{
ShirtID=s;
Price=p;
Color=c;
Description=d;
Quantityinstock=q;
}
//method declaration
public void addashirt(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+"\nDescription: "+Description+"\nColor: "+Color+"\nQuantity: "+Quantityinstock);
System.out.println("Thank you it was succesfully added");
}
public void removeaShirt(int newShirtID)
{
ShirtID=newShirtID;
System.out.println("The Shirt number"+ShirtID+"is succesfully remove ");
}
}
******************************************************************************
/*Programmer: Gerlie O. Lidon
Date started: Feb 7, 2009
Date ended: Feb 8, 2009
Program name: Customer
Program purpose: To create a solution for direct clothing
*/
public class Customer
{
//customer variable declaration
private int CustomerID;
private String Name;
private String Address;
private int Phonenumber;
private String Emailaddress;
//customer constructor declaration
public Customer()
{
}
public Customer(int c, String n, String a, int p, String e)
{
CustomerID=c;
Name=n;
Address=a;
Phonenumber=p;
Emailaddress=e;
}
//customer method declarations
public void customergreetings(String newname)
{
Name=newname;
System.out.println("Welcome" + Name + " To DIRECT CLOTHING Shop");
}
public void customerprofile(String newname, int newid, String newaddress, int newphonenumber, String newemailaddress)
{
CustomerID=newid;
Name=newname;
Address=newaddress;
Phonenumber=newphonenumber;
Emailaddress=newemailaddress;
System.out.println("Customer's Informations");
System.out.println( "\nCustomerID: "+CustomerID+" \nName: "+Name+" \nAddress: "+Address+" \nPhonenumber: "+Phonenumber+" \nEmailaddress: "+Emailaddress);
}
}
***************************************************************************
/*Programmer: Gerlie O. Lidon
Date started: Feb 7, 2009
Date ended: Feb 8, 2009
Program name: Order
Program purpose: To create a solution for direct clothing
*/
public class Order
{
//variable declaration
private int OrderID;
private double Totalprice;
private String Status;
//constuctor declaration
public Order()
{
}
public Order(int o, double tp, String s)
{
OrderID=o;
Totalprice=tp;
Status=s;
}
//method declaration..
public void placeorder(int newo, double newtp, String news)
{
OrderID=newo;
Totalprice=newtp;
Status=news;
}
public void removeorder(int o)
{
OrderID=o;
System.out.println("Order number: "+OrderID+" is succesfully cancelled...Thank you!");
}
public void submitOrder()
{
System.out.println("Order number is succesfully submitted the "+OrderID);
}
public void putorderonhold()
{
System.out.println("The order is still to be proccess.\n Wait for a while for the reply. Thank you!");
}
}
******************************************************************************
/*Programmer: Gerlie O. Lidon
Date started: Feb 7, 2009
Date ended: Feb 8, 2009
Program name: Shirt
Program purpose: To create a solution for direct clothing
*/
public class Shirt
{
//variable declaration
private int ShirtID;
private double Price;
private String Description;
private String Color;
private int Quantityinstock;
//constructor declaration
public Shirt()
{
}
public Shirt(int s, double p, String d, String c, int q)
{
ShirtID=s;
Price=p;
Description=d;
Color=c;
Quantityinstock=q;
}
//method declaration
public void addshirttoorder(int newShirtID)
{
ShirtID=newShirtID;
System.out.println("You have added Shirt number "+ShirtID+" to your orders");
}
public void removeshirttoorder(int newShirtID)
{
ShirtID=newShirtID;
System.out.println("Shirt number " +ShirtID+ "is successfully remove from the orders");
}
public void displayshirtinformation()
{
System.out.println("Shirt number: "+ShirtID+" \nPrice: "+Price+" \nDescription: "+Description+" \nColor: "+Color+" \nQuantity in Stock: "+Quantityinstock);
}
public void addstock(int newShirtID, double newPrice, String newColor, String newDescription, int newQuantityinstock)
{
ShirtID=newShirtID;
Price=newPrice;
Description=newDescription;
Color=newColor;
Quantityinstock=newQuantityinstock;
System.out.println("Shirt number: "+ShirtID+ "\nPrice: "+Price+"\nDescription: "+Description+"\nColor: "+Color+"\nQuantity in Stock: "+Quantityinstock);
System.out.println("Your information has been succesfully added");
}
public void removestock(int newShirtID)
{
ShirtID=newShirtID;
System.out.println("The Shirt number "+ShirtID+" is succesfully remove from the stock");
}
}
******************************************************************************
/*Programmer: Gerlie O. Lidon
Date started: Feb 7, 2009
Date ended: Feb 8, 2009
Program name: Form of Payment
Program purpose: To create a solution for direct clothing
*/
public class FormOfPayment
{
//variable declaration...
private int Checknumber;
private int Creditcardnumber;
private String Expirationdate;
// constructor declaration..
public FormOfPayment()
{
}
public FormOfPayment(int c, int cc, String e)
{
Checknumber=c;
Creditcardnumber=cc;
Expirationdate=e;
}
public void verifyCreditcard()
{
System.out.println("Your credit card is OK ");
System.out.println("We will less your the amount from your credit card");
}
public void verifyCheckpayment()
{
System.out.println("You must send the a Check in our company before we are going to Send your orders! Thank you!");
}
}
*******************************Thank You!!!**********************************
Monday, February 9, 2009
Wednesday, February 4, 2009
IT134A_DDS
/*Programmer: Gerlie O. Lidon
Date started: 02-04-2009
Date ended: 02-04-2009
Program name: Cube
Program purpose: To create classes using Visibility Modifiers.*/
public class Cube{
private double length;
private double width;
private double height;
private double volume;
private double area;
public Cube(double l, double w, double h)
{
l=length;
w=width;
h=height; }
public Cube()
{
}
private double volume()
{
return (length*width*height);
}
private double area()
{
return (length*width);
}
public void setDimension(double newLength, double newwidth, double newheight)
{
length=newLength;
width=newWidth;
height=newHeight;
}
public void displayCube()
{
System.out.println("Cube Dimensions");
System.out.println("The VOLUME of the Cube is" +volume());
System.out.println("The AREA of the Cube is" +area());
}
}
>>>>>>>>>>>>>>>>..................................>>>>>>>>>>>>>>>>>>
/*Programmer: Gerlie O. Lidon
Date started: 02-04-2009
Date ended: 02-04-2009
Program name: CubeTester1
Program purpose:
To create classes using Visibility Modifiers.*/
import java.util.Scanner;
class CubeTester
{
public static void main(String args[])
{
double l;
double w;
double h;
System.out.println("\n\n");
System.out.println("The Cube object with a parameter");
Cube firstCube=new Cube(2,2,2);;
firstCube.displayCube();
System.out.println("The Cube object without a parameter");
System.out.println("\n\n");
Scanner a=new Scanner(System.in);
System.out.println("enter the value of the length:");
l=a.nextDouble();
Scanner b=new Scanner(System.in);
System.out.println("enter the value of the height:");
w=b.nextDouble();
Scanner c=new Scanner(System.in);
System.out.println("enter the value of the width:");
h=c.nextDouble();
System.out.println("The Cube object without a parameter");
System.out.println("\n\n");
Cube secondCube=new Cube();
secondCube.setDimension(l,w,h);
secondCube.displayCube();
}
}
Date started: 02-04-2009
Date ended: 02-04-2009
Program name: Cube
Program purpose: To create classes using Visibility Modifiers.*/
public class Cube{
private double length;
private double width;
private double height;
private double volume;
private double area;
public Cube(double l, double w, double h)
{
l=length;
w=width;
h=height; }
public Cube()
{
}
private double volume()
{
return (length*width*height);
}
private double area()
{
return (length*width);
}
public void setDimension(double newLength, double newwidth, double newheight)
{
length=newLength;
width=newWidth;
height=newHeight;
}
public void displayCube()
{
System.out.println("Cube Dimensions");
System.out.println("The VOLUME of the Cube is" +volume());
System.out.println("The AREA of the Cube is" +area());
}
}
>>>>>>>>>>>>>>>>..................................>>>>>>>>>>>>>>>>>>
/*Programmer: Gerlie O. Lidon
Date started: 02-04-2009
Date ended: 02-04-2009
Program name: CubeTester1
Program purpose:
To create classes using Visibility Modifiers.*/
import java.util.Scanner;
class CubeTester
{
public static void main(String args[])
{
double l;
double w;
double h;
System.out.println("\n\n");
System.out.println("The Cube object with a parameter");
Cube firstCube=new Cube(2,2,2);;
firstCube.displayCube();
System.out.println("The Cube object without a parameter");
System.out.println("\n\n");
Scanner a=new Scanner(System.in);
System.out.println("enter the value of the length:");
l=a.nextDouble();
Scanner b=new Scanner(System.in);
System.out.println("enter the value of the height:");
w=b.nextDouble();
Scanner c=new Scanner(System.in);
System.out.println("enter the value of the width:");
h=c.nextDouble();
System.out.println("The Cube object without a parameter");
System.out.println("\n\n");
Cube secondCube=new Cube();
secondCube.setDimension(l,w,h);
secondCube.displayCube();
}
}
Subscribe to:
Posts (Atom)