博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
复利计算器5.0
阅读量:4449 次
发布时间:2019-06-07

本文共 3600 字,大约阅读时间需要 12 分钟。

结对同伴:

学号:201406114105

姓名:董婷婷

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

一、项目需求:

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

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

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

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

估计完成时间:5h

实际完成时间:3h

三、主要代码

1 public void Invest_Panel_Design() { 2         label_9 = new JLabel("\u6211\u7231\u6295\u8D44\u7406\u8D22"); 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("\u6295\u8D44\u91D1\u989D\uFF1A"); 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("\u6295\u8D44\u5E74\u9650\uFF1A");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("\u5230\u671F\u672C\u606F\uFF1A");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("\u8BA1\u7B97\u7ED3\u679C");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("\u5355\u5229\uFF1A");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("\u590D\u5229\uFF1A");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("\u5229\u7387(%)\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

四、功能实现结果

五、结对工作时的照片

六、分工

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

七、总结

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

转载于:https://www.cnblogs.com/LwF39/p/5361154.html

你可能感兴趣的文章
web前端好学吗?
查看>>
IOS 开源Framework
查看>>
图论-最小生成树模版
查看>>
使用curl模拟ip和来源进行网站采集的实现方法
查看>>
关于文件操作
查看>>
BZOJ-3212 Pku3468 A Simple Problem with Integers 裸线段树区间维护查询
查看>>
ChibiOS/RT 2.6.9 CAN Low Level Driver for STM32
查看>>
查询帮助
查看>>
ASP.NET Session详解(转)
查看>>
[POJ1007]DNA Sorting
查看>>
Java读取文件
查看>>
物件识别与距离测量系统
查看>>
结对博客
查看>>
我在城市快节奏中的慢生活
查看>>
B1232 [Usaco2008Nov]安慰奶牛cheer 最小生成树
查看>>
使用 git push 出现error setting certificate verify locations问题记录
查看>>
真没想到VB也可以这样用之指针技术 --不详,向作者致敬  ,转
查看>>
2、在1.VMware虚拟机上安装ubantu系统
查看>>
vue
查看>>
用 eric6 与 PyQt5 实现python的极速GUI编程(系列01)--Hello world!
查看>>