public class shirt{
private String ShirtID;
private double Price;
private String Color;
private String Description;
private int Quantity;
public shirt (String TShirtID, double TPrice, String TColor, String TDescription, int TQuantity){
ShirtID=TShirtID;
Price=TPrice;
Color=TColor;
Description=TDescription;
Quantity=TQuantity;
}
public void setShirtID( String TShirtID){
ShirtID=TShirtID;
}
public String getShirtID(){
return ShirtID;
}
public void setPrice( double TPrice){
Price=TPrice;
}
public double getPrice(){
return Price;
}
public void setColor( String TColor){
Color=TColor;
}
public String getColor(){
return Color; }
public void setDescription( String TDescription){
Description=TDescription;
}
public String getDescription(){
return Description;
}
public void setQuantity( int TQuantity)
{
Quantity=TQuantity;
}
public int getQuantity(){
return Quantity;
}
}
public class Customer{
private int CustomerID;
private String Name;
private String Address;
private int PhoneNum;
private String EmailAdd;
public Customer(){ }
public void Customer(int TCustomerID,String TName, String TAddress, int TPhoneNum, String TEmailAdd){
CustomerID=TCustomerID;
Name=TName;
Address=TAddress;
PhoneNum=TPhoneNum;
EmailAdd=TEmailAdd;
System.out.println ("CustomerID:"+CustomerID+"\nNAME:"+Name+"\nAddress:"+Address+"\nPhoneNum."+PhoneNum+"\nE-mail Address:"+EmailAdd);
}
}
public class Order{
private String OrderID;
private double TotalPrice;
private String Status;
public Order(){ }
public void Shirts(String TOrderID, double TTotalPrice, String TStatus)
{
String OrderID = TOrderID;
double TotalPrice=TTotalPrice;
String Status=TStatus;
}
public void setOrderID(String TOrderID)
{ String OrderID=TOrderID;
}
public String getOrderID(){ return OrderID; } public void setTotalPrice(double TTotalPrice){
String TotalPrice=TTotalPrice;
}
public String getTotalPrice()
{
return TotalPrice;
}
public void setStatus(String TStatus){
String Status=TStatus;
}
public String getStatus(){
return Status;
}
}
public class Payment{
private String CheckNum;
private String CCardNum;
private String ExpDate;
public Payment(String TCheckNum, String TCCardNum, String TExpDate ){
String CheckNum=TCheckNum;
String CCardNum=TCCardNum;
String ExpDate=TExpDate;
}
public void setCheckNum(String TCheckNum){
String CheckNum=TCheckNum;
}
public String getCheckNum(){
return CheckNum;
}
public void setCCardNum(String TCCardNum){
String CCardNum=TCCardNum;
}
public String getCCardNum(){
return CCardNum;
}
public void setExpDate (String TExpDate ){
String ExpDate =TExpDate ;
}
public String getExpDate (){
return ExpDate ;
}
public void Check(){
System.out.println("Check number is:%s")
}
}
public class Catalog{
private String shirt;
public void addShirt(String newShirt) {shirt=newShirt;
}
public void removedShirt(String deleteShirt)
{shirt=deleteShirt;
}
}
import java.util.Scanner;
public class Tester{
public static void main ( String [] args){
Scanner x = new Scanner(System.in);
shirt TheShirt= new shirt();
System.out.println(" choose on our catalog ");
TheShirt.displayCatalog();
Scanner x=new Scanner(System.in);
System.out.println("Do you have your choice?");
if(x=='y') {
System.out.println("Enter ShirtID:");
String ID=x.nextLine(); TheShirt.setShirtID(ID);
System.out.println();
System.out.println("Enter Price:");
double price=x.nextDouble();
TheShirt.setPrice(price);
System.out.println();
System.out.println("Enter Color:");
String color=x.nextLine();
TheShirt.setColor(color);
System.out.println();
System.out.println("Enter Quantity:");
int Tquantity=x.nextInt();
TheShirt.setQuantiy(Tquantity);
System.out.println();
System.out.println(" Enter Shirt Description:");
String TheDescription=x.nextLine();
TheShirt.setDescription(TheDescription);
System.out.println(); System.out.println("Choose successfully");
}
else{
System.out.println("OK");
}
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment