资源简介
卡纳基梅隆大学ssd1课程exam的Catfish.java有findMate和mateIfPossible的功能。
代码片段和文件信息
import java.util.Vector;
/*
* Created on Jul 5 2003
*
*/
/**
* Catfish - simulates a catfish - can swim eat and consume
* energy in the process.
*
* @author iCarnegie av
*
*/
public class Catfish extends Animal {
/**
* Energy needed to swim in a block of time.
*/
private static final int ENERGY_TO_SWIM = 0;
private static final int ENERGY_TO_EAT= 0;
/**
* Energy needed to look for food once.
*/
private static final int ENERGY_TO_LOOK_FOR_FOOD = 0;
private static final int ENERGY_TO_LOOK_FOR_FRIEND = 0;
private static final int ENERGY_TO_MATE = 0;
/**
* Lowest possible energy needed for a baby to survive.
*/
private static final int BABY_MIN_ENERGY = 0;
/**
* Maximum energy that a baby can store.
*/
pr
- 上一篇:android AlertDialog使用例程
- 下一篇:java条形码识别
评论
共有 条评论