第一次编程作业

第一次个人编程作业:我的分数我做主

博客班级 https://edu.cnblogs.com/campus/fzzcxy/2018SE1
作业要求 https://edu.cnblogs.com/campus/fzzcxy/2018SE1/homework/11110
作业目标 1.按要求在班级博客发布一篇随笔,使用Markdown语法进行编辑。
2.按要求在码云上创建仓库,并提交代码。
编程:我的分数我做主小程序
作业源代码 https://gitee.com/fang-xinyuan/personal/tree/master/score
学号 211806315

代码量&所花时间

代码量:150行

所花时间:

​ 分析要求:5m。

​ 编写代码:4h。

​ 创建&实用git:4h。

​ 合计:8h。

思路&代码

解析网页

展开查看
                        File file = new File("xxx/xxx.html");
                        org.jsoup.nodes.Document d1 = Jsoup.parse(file, "UTF-8");

提取关键词

展开查看
                        Elements elements = d1.getElementsByAttributeValue("class", "interaction-row");

计算总分

展开查看
                        Score score = new Score();
                        double final_score =
			score.Before(my_before,max_before)*0.25 +
			score.Before(my_base,max_base)*0.3 +
			score.Before(my_test,max_test)*0.2 +
			score.Before(my_program,max_program)*0.1 +
			score.Before(my_add,max_add)*0.05;

具体代码详细见码云。

git使用

远程仓库克隆到本地

展开查看
                        git clone 地址

本地仓库需要关联到远程仓库根目录下执行

展开查看
                        git init

提交代码

展开查看
                        git add .
                        git commit -m "初始化项目"
                        git push

心得

罗马不是一日建成的!

参考

  1. https://www.cnblogs.com/Icarus52/p/13638303.html
  2. https://www.cnblogs.com/hyb456835/p/13651153.html
  3. https://www.cnblogs.com/Ronchi-Zhang/p/13648030.html
  4. https://www.cnblogs.com/xienb/p/11250990.html
  5. https://blog.csdn.net/qq_39603448/article/details/90296174
  6. https://blog.csdn.net/qq_33166046/article/details/52922689
  7. https://www.open-open.com/jsoup/parse-document-from-string.htm
  8. https://jingyan.baidu.com/article/a65957f4e341d924e67f9bb4.html
posted on 2020-09-11 22:39  KiraAlice  阅读(197)  评论(0编辑  收藏  举报