• 复利计算器5.0


    结对同伴:

    学号:201406114105

    姓名:董婷婷

    博客地址:http://home.cnblogs.com/u/babys8023/

    一、项目需求:

         即要追求利益,又要面对不可预知的金融投资风险, “不能把鸡蛋放在同一个篮子里”,所以有必要进行组合投资。

         通过上述计算与对比,可以帮助客户进行投资决策。 

         客户:那么能否帮我记录下一笔一笔不同类型的投资,并动态显示资金现值呢?

    二、项目估计完成时间与实际完成时间

    估计完成时间:5h

    实际完成时间:3h

    三、主要代码

     1 public void Invest_Panel_Design() {
     2         label_9 = new JLabel("u6211u7231u6295u8D44u7406u8D22");
     3         label_9.setFont(new Font("Microsoft JhengHei", Font.PLAIN, 18));
     4         label_9.setBounds(124, 25, 144, 25);
     5         Invest_Panel.add(label_9);
     6         
     7         label_10 = new JLabel("u6295u8D44u91D1u989DuFF1A");
     8         label_10.setFont(new Font("Microsoft JhengHei", Font.PLAIN, 16));
     9         label_10.setBounds(28, 99, 88, 15);
    10         Invest_Panel.add(label_10);
    11         
    12         label_11 = new JLabel("u6295u8D44u5E74u9650uFF1A");
    13         label_11.setFont(new Font("Microsoft JhengHei", Font.PLAIN, 16));
    14         label_11.setBounds(30, 162, 81, 15);
    15         Invest_Panel.add(label_11);
    16         
    17         Invest_money_tf = new JTextField();
    18         Invest_money_tf.setBounds(149, 98, 106, 21);
    19         Invest_Panel.add(Invest_money_tf);
    20         Invest_money_tf.setColumns(10);
    21         
    22         Invest_year_tf = new JTextField();
    23         Invest_year_tf.setBounds(149, 161, 106, 21);
    24         Invest_Panel.add(Invest_year_tf);
    25         Invest_year_tf.setColumns(10);
    26         
    27         Invest_rate_tf = new JTextField();
    28         Invest_rate_tf.setBounds(149, 207, 106, 21);
    29         Invest_Panel.add(Invest_rate_tf);
    30         Invest_rate_tf.setColumns(10);
    31         
    32         Invest_money_tf.addKeyListener(keyAdapter);
    33         Invest_year_tf.addKeyListener(keyAdapter); 
    34         Invest_rate_tf.addKeyListener(keyAdapter);
    35         
    36         
    37         label_12 = new JLabel("u5230u671Fu672Cu606FuFF1A");
    38         label_12.setFont(new Font("Microsoft JhengHei", Font.PLAIN, 16));
    39         label_12.setBounds(19, 301, 97, 15);
    40         Invest_Panel.add(label_12);
    41         
    42         JButton button = new JButton("u8BA1u7B97u7ED3u679C");
    43         button.addMouseListener(new MouseAdapter() {
    44         button.setFont(new Font("Microsoft JhengHei", Font.PLAIN, 16));
    45         button.setBounds(5, 234, 106, 23);
    46         Invest_Panel.add(button);
    47         
    48         JLabel label = new JLabel("u5355u5229uFF1A");
    49         label.setFont(new Font("宋体", Font.PLAIN, 14));
    50         label.setBounds(107, 276, 54, 15);
    51         Invest_Panel.add(label);
    52         
    53         JLabel label_13 = new JLabel("u590Du5229uFF1A");
    54         label_13.setFont(new Font("宋体", Font.PLAIN, 14));
    55         label_13.setBounds(106, 326, 54, 15);
    56         Invest_Panel.add(label_13);
    57         
    58         label_14 = new JLabel("u5229u7387(%)uFF1A");
    59         label_14.setFont(new Font("Microsoft JhengHei", Font.PLAIN, 16));
    60         label_14.setBounds(34, 209, 77, 15);
    61         Invest_Panel.add(label_14);
    62         
    63         Invest_simple_tf = new JTextField();
    64         Invest_simple_tf.setBounds(149, 273, 106, 21);
    65         Invest_Panel.add(Invest_simple_tf);
    66         Invest_simple_tf.setColumns(10);
    67         
    68         Invest_compound_tf = new JTextField();
    69         Invest_compound_tf.setBounds(149, 323, 106, 21);
    70         Invest_Panel.add(Invest_compound_tf);
    71         Invest_compound_tf.setColumns(10);
    72     }

    代码链接:https://github.com/LinWenFeng/CompoundInterest

    四、功能实现结果

    五、结对工作时的照片

    六、分工

        我主要是负责编写实现这个功能的代码,而我的同伴是督促我的进度和发现代码中的小错误和进行数据测试。

    七、总结

        在此次结对编程过程中,我主要负责编写实现功能的代码,同伴帮忙查找错误和测试数据,这样能够减少花费的精力和时间。

  • 相关阅读:
    【Python3爬虫】一次应对JS反调试的记录
    【Python3爬虫】突破反爬之应对前端反调试手段
    学习CSS之如何改变CSS伪元素的样式
    学习CSS之用CSS实现时钟效果
    学习CSS之用CSS绘制一些基本图形
    【Python3爬虫】一次破解JS加密数据的记录
    Linux安装部署Redis(超级详细)
    Linux部署MongoDB
    使用Nginx对.NetCore站点进行反向代理
    Linux部署.NetCore站点 使用Supervisor进行托管部署
  • 原文地址:https://www.cnblogs.com/LwF39/p/5361154.html
Copyright © 2020-2023  润新知