⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 person.java

📁 利用JAVA实现的利用进化算法对人口增长进行仿真的源码
💻 JAVA
字号:
/*
 * 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -