person.java

来自「利用JAVA实现的利用进化算法对人口增长进行仿真的源码」· Java 代码 · 共 62 行

JAVA
62
字号
/*
 * Person.java
 *
 * Created on 12 October 2006, 08:07
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package wpc.data;
import java.awt.Graphics;
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
/**
 *
 * @author User
 */
public class Person extends DataObject{
    /*
     *A person should have:
     *A First Name
     *A second Name
     *An age
     *A genetics array
     *No link infomation should be stored here for the parents, instead use
     *a FAMILYTREE object, that everyone gets added to.
     *Store Job infomation here?
     *Store wife/infomation here?  Could posibly use the family tree to find
     *mates, again reducing the size.
     */
    /** Creates a new instance of Person */
    
    public Person(wpc.MainFrame mainFrame) {
        super(mainFrame);
        createData(0);
    }
    
    public void createData(int number){
        if(mainFrame.getMaxWorldTraversal() >= 6) {
           if(mainFrame.getDelayPerson()){
             try {
                Thread.sleep(mainFrame.getDelayPersonValue());
                //System.out.println("Checking");
             } catch (InterruptedException e){
                // the VM doesn't want us to sleep anymore,
                // so get back to work
             }
           }
        }
    }
    
   public void draw(Graphics g){
        
    }
    
    public void calcYear(){

    }
    
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?