/*
* (Non-javadoc)
*
* @see Cn.edu.ynu.sei.factorymethod.fruit#harvest ()
*/
@Override
public void Harvest ()
{
System.out.println ("Grape has been harvested.");
}
/*
* (Non-javadoc)
*
* @see Cn.edu.ynu.sei.factorymethod.fruit#plant ()
*/
@Override
public void Plant ()
{
System.out.println ("Grape has been planted.");
}
/**
* Is there no seed?
* @return
*/
public boolean getseedless ()
{
return seedless;
}
/**
* Set whether no seeds
* @param seedless
*/
public void Setseedless (Boolean seedless)
{
this. seedless = seedless;
}
}
Package Cn.edu.ynu.sei.factoryMethod;
/**
* Customers of Orchard
*
* @author 88250
* @version 1.0.0, 2007-8-13
*/
public class Client
{
/**
* Main program Entry point
*
* @param args
* <code>null</code>
*/
public static void Main (string[] args)
{
Fruit Apple, strawberry, grape;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.