Written on Monday, February 18, 2008 @ 5:49 AM
Okays, Lets start the post with some codings hahahaha!
public class clothing {
String ID, Desc;
char Colour_code;
double price;
public void displayInfo(){
System.out.println("Product ID;" + ID);
System.out.println("Description: " +Desc);
System.out.println("Colour_code:" +Colour_code);
System.out.println("Price:" +price);
}
}
class Shirt extends clothing{
char size;
public void setShirtInfo(){
ID="0001";
Desc ="T-Shirt";
Colour_code= 'T';
size = 'M';
price = 23.75;
}
public void displayShirtInfo(){
displayInfo();
System.out.println("Size:" +size);
System.out.println();
}
}
class testClothing{
public static void main(String [] args){
Shirt s1 = new Shirt();
s1.setShirtInfo();
s1.displayShirtInfo();
Pants p1 = new Pants();
p1.setPantsInfo();
p1.displayPantsInfo();
}
}
class Pants extends clothing{
String length;
public void setPantsInfo(){
ID="0002";
Desc ="Jeans";
Colour_code= 'A';
length = "32";
price = 43.75;
}
public void displayPantsInfo(){
displayInfo();
System.out.println("length:" +length);
System.out.println();
}
}
bleah!
Todays BM was fun man. i Love DM..er i mean BM hahaha. so fun cleaning the house of God and fellowships!
something within me