Pg168—2题 修改

package org.hanqi.pn0120;

public class JuXing {
    
    
    JuXing(double chang,double kuan)
    {
        this.chang=chang;
        
        this.kuan=kuan;
    }
    
    double chang;
    
    double kuan;
    
    double getMianJi()
    {
        return  this.chang*this.kuan;
    }
    public static void main(String[] args)
    {
        JuXing myJX=new JuXing(20,10);
        
        System.out.println("计算得到的面积=" +myJX.getMianJi());
    }

}
课后题修改

posted @ 2016-03-05 11:36  1011042043  阅读(101)  评论(0编辑  收藏  举报