# BUAA_OO_2022 第一单元总结

## 1. 第一次作业分析

### 1.3 方法复杂度分析

method CogC ev(G) iv(G) v(G)
expr.Base.Base() 0.0 1.0 1.0 1.0
expr.Base.getNumbers() 0.0 1.0 1.0 1.0
expr.Base.powPoly(Expr, int) 26.0 1.0 10.0 10.0
expr.Expr.addTerm(boolean, Term) 6.0 1.0 4.0 4.0
expr.Expr.Expr() 0.0 1.0 1.0 1.0
expr.Expr.getNumbers() 0.0 1.0 1.0 1.0
expr.Expr.getTerms() 0.0 1.0 1.0 1.0
expr.Number.getNum() 0.0 1.0 1.0 1.0
expr.Number.getTag() 0.0 1.0 1.0 1.0
expr.Number.getZhishu() 0.0 1.0 1.0 1.0
expr.Number.Number(BigInteger, int) 0.0 1.0 1.0 1.0
expr.Number.setNum(BigInteger) 0.0 1.0 1.0 1.0
expr.Number.setTag(int) 0.0 1.0 1.0 1.0
expr.Number.setZhishu(int) 0.0 1.0 1.0 1.0
expr.Number.toString() 0.0 1.0 1.0 1.0
expr.Term.getBases() 0.0 1.0 1.0 1.0
expr.Term.getNumbers() 0.0 1.0 1.0 1.0
expr.Term.Term() 0.0 1.0 1.0 1.0
Lexer.getNumber() 2.0 1.0 3.0 3.0
Lexer.Lexer(String) 0.0 1.0 1.0 1.0
Lexer.next() 3.0 2.0 3.0 4.0
Lexer.peek() 0.0 1.0 1.0 1.0
MainClass.change(String) 2.0 1.0 2.0 3.0
MainClass.main(String[]) 4.0 1.0 3.0 3.0
MainClass.mody(Expr) 9.0 1.0 6.0 6.0
MainClass.print(Number) 16.0 1.0 13.0 13.0
Parser.parseBase() 5.0 1.0 3.0 3.0
Parser.parseExpression() 2.0 1.0 3.0 3.0
Parser.parseFactor() 25.0 1.0 9.0 9.0
Parser.Parser(Lexer) 0.0 1.0 1.0 1.0
Parser.parseTerm() 1.0 1.0 2.0 2.0
Total 119.0 35.0 91.0 93.0
Average 3.5 1.0294117647058822 2.676470588235294 2.735294117647059

### 1.4 类度量

Class OCavg OCmax WMC
expr.Base 3.0 10.0 15.0
expr.Expr 1.75 4.0 7.0
expr.Number 1.0 1.0 8.0
expr.Term 2.75 8.0 11.0
Lexer 2.0 4.0 8.0
MainClass 6.0 13.0 24.0
Parser 3.4 9.0 17.0
Total 90.0
Average 2.6470588235294117 7.0 12.857142857142858

## 2. 第二次作业分析

### 2.3 方法复杂度分析

method CogC ev(G) iv(G) v(G)
Base.Base() 0.0 1.0 1.0 1.0
Base.getContainers() 0.0 1.0 1.0 1.0
Base.powPoly(Expr, BigInteger) 46.0 1.0 13.0 13.0
Container.Container() 0.0 1.0 1.0 1.0
Container.getCoef() 0.0 1.0 1.0 1.0
Container.getCosclasses() 0.0 1.0 1.0 1.0
Container.getSinclasses() 0.0 1.0 1.0 1.0
Container.getTag() 0.0 1.0 1.0 1.0
Container.getXexpo() 0.0 1.0 1.0 1.0
Container.setCoef(BigInteger) 0.0 1.0 1.0 1.0
Container.setCosclasses(ArrayList) 0.0 1.0 1.0 1.0
Container.setSinclasses(ArrayList) 0.0 1.0 1.0 1.0
Container.setTag(int) 0.0 1.0 1.0 1.0
Container.setXexpo(BigInteger) 0.0 1.0 1.0 1.0
Cosclass.Cosclass() 0.0 1.0 1.0 1.0
Cosclass.getCoscoef() 0.0 1.0 1.0 1.0
Cosclass.getCosexpo() 0.0 1.0 1.0 1.0
Cosclass.getCossexpo() 0.0 1.0 1.0 1.0
Cosclass.setCoscoef(BigInteger) 0.0 1.0 1.0 1.0
Cosclass.setCosexpo(BigInteger) 0.0 1.0 1.0 1.0
Cosclass.setCossexpo(BigInteger) 0.0 1.0 1.0 1.0
Customfunc.Customfunc() 0.0 1.0 1.0 1.0
Customfunc.define(String) 8.0 1.0 5.0 6.0
Customfunc.getType() 0.0 1.0 1.0 1.0
Customfunc.parseString(String, int) 10.0 1.0 8.0 9.0
Expr.addTerm(boolean, Term) 6.0 1.0 4.0 4.0
Expr.Expr() 0.0 1.0 1.0 1.0
Expr.getContainers() 0.0 1.0 1.0 1.0
Expr.getTerms() 0.0 1.0 1.0 1.0
Lexer.getNumber() 2.0 1.0 3.0 3.0
Lexer.Lexer(String) 0.0 1.0 1.0 1.0
Lexer.next() 5.0 2.0 5.0 6.0
Lexer.peek() 0.0 1.0 1.0 1.0
Main.change(String) 2.0 1.0 2.0 3.0
Main.main(String[]) 24.0 1.0 14.0 14.0
Main.mody(Expr) 19.0 4.0 11.0 11.0
Main.print(Container) 6.0 1.0 4.0 4.0
Main.print2(Container) 53.0 1.0 18.0 18.0
Modify.mody2(Expr) 31.0 1.0 14.0 14.0
Modify.mody3(Expr) 52.0 1.0 16.0 18.0
Parser.parseBase() 9.0 1.0 4.0 4.0
Parser.parseExpression() 9.0 1.0 5.0 7.0
Parser.parsemi(boolean, BigInteger, BigInteger) 0.0 1.0 1.0 1.0
Parser.Parser(Lexer) 0.0 1.0 1.0 1.0
Parser.parseSimple() 26.0 1.0 12.0 12.0
Parser.parseTerm() 1.0 1.0 2.0 2.0
Parser.parsetri(boolean, String, Container, BigInteger) 0.0 1.0 1.0 1.0
Simplefunc.setSimple(boolean, BigInteger, BigInteger) 2.0 1.0 2.0 2.0
Sinclass.getSincoef() 0.0 1.0 1.0 1.0
Sinclass.getSinexpo() 0.0 1.0 1.0 1.0
Sinclass.getSinsexpo() 0.0 1.0 1.0 1.0
Sinclass.setSincoef(BigInteger) 0.0 1.0 1.0 1.0
Sinclass.setSinexpo(BigInteger) 0.0 1.0 1.0 1.0
Sinclass.setSinsexpo(BigInteger) 0.0 1.0 1.0 1.0
Sinclass.Sinclass() 0.0 1.0 1.0 1.0
Sumfunc.parsesum(String, int) 9.0 1.0 6.0 7.0
Sumfunc.Sumfunc() 0.0 1.0 1.0 1.0
Term.getBases() 0.0 1.0 1.0 1.0
Term.getContainers() 0.0 1.0 1.0 1.0
Term.Term() 0.0 1.0 1.0 1.0
Trigfunc.setTri(boolean, String, Container, BigInteger) 4.0 1.0 4.0 4.0
Total 362.0 70.0 210.0 219.0
Average 5.484848484848484 1.0606060606060606 3.1818181818181817 3.3181818181818183

### 2.4 类度量

class OCavg OCmax WMC
Base 3.6 13.0 18.0
Container 1.0 1.0 13.0
Cosclass 1.0 1.0 7.0
Customfunc 4.25 9.0 17.0
Expr 1.75 4.0 7.0
Lexer 2.25 5.0 9.0
Main 9.6 18.0 48.0
Modify 12.0 12.0 24.0
Parser 3.5714285714285716 11.0 25.0
Simplefunc 2.0 2.0 2.0
Sinclass 1.0 1.0 7.0
Sumfunc 4.0 7.0 8.0
Term 3.75 12.0 15.0
Trigfunc 4.0 4.0 4.0
Total 204.0
Average 3.090909090909091 7.142857142857143 14.571428571428571

## 3. 第三次作业分析

### 3.3 方法复杂度分析

method CogC ev(G) iv(G) v(G)
src.Base.Base() 0.0 1.0 1.0 1.0
src.Base.getContainers() 0.0 1.0 1.0 1.0
src.Base.powPoly(Expr, BigInteger) 51.0 1.0 14.0 14.0
src.Container.Container() 0.0 1.0 1.0 1.0
src.Container.copyAll(ArrayList) 7.0 1.0 4.0 4.0
src.Container.getCoef() 0.0 1.0 1.0 1.0
src.Container.getCosclasses() 0.0 1.0 1.0 1.0
src.Container.getSinclasses() 0.0 1.0 1.0 1.0
src.Container.getTag() 0.0 1.0 1.0 1.0
src.Container.getXexpo() 0.0 1.0 1.0 1.0
src.Container.setCoef(BigInteger) 0.0 1.0 1.0 1.0
src.Container.setCosclasses(ArrayList) 0.0 1.0 1.0 1.0
src.Container.setSinclasses(ArrayList) 0.0 1.0 1.0 1.0
src.Container.setTag(int) 0.0 1.0 1.0 1.0
src.Container.setXexpo(BigInteger) 0.0 1.0 1.0 1.0
src.Container.toString() 4.0 1.0 4.0 4.0
src.Cosclass.Cosclass() 0.0 1.0 1.0 1.0
src.Cosclass.getCoscs() 0.0 1.0 1.0 1.0
src.Cosclass.getExpo() 0.0 1.0 1.0 1.0
src.Cosclass.setCoscs(ArrayList) 0.0 1.0 1.0 1.0
src.Cosclass.setExpo(BigInteger) 0.0 1.0 1.0 1.0
src.Cosclass.tostr() 1.0 1.0 1.0 2.0
src.Cosclass.toString() 1.0 1.0 2.0 2.0
src.Customfunc.Customfunc() 0.0 1.0 1.0 1.0
src.Customfunc.define(String) 8.0 1.0 5.0 6.0
src.Customfunc.getType() 0.0 1.0 1.0 1.0
src.Customfunc.parseString(String, int) 17.0 3.0 12.0 14.0
src.Expr.addTerm(boolean, Term) 28.0 1.0 11.0 14.0
src.Expr.Expr() 0.0 1.0 1.0 1.0
src.Expr.getContainers() 0.0 1.0 1.0 1.0
src.Expr.getTerms() 0.0 1.0 1.0 1.0
src.Expr.toString() 1.0 1.0 2.0 2.0
src.Lexer.getNumber() 2.0 1.0 3.0 3.0
src.Lexer.Lexer(String) 0.0 1.0 1.0 1.0
src.Lexer.next() 5.0 2.0 5.0 6.0
src.Lexer.peek() 0.0 1.0 1.0 1.0
src.Main.change(String) 2.0 1.0 2.0 3.0
src.Main.main(String[]) 20.0 1.0 12.0 12.0
src.Parser.parseBase() 9.0 1.0 4.0 4.0
src.Parser.parseExpression() 9.0 1.0 5.0 7.0
src.Parser.parsemi(boolean, BigInteger, BigInteger) 0.0 1.0 1.0 1.0
src.Parser.Parser(Lexer) 0.0 1.0 1.0 1.0
src.Parser.parseSimple() 26.0 1.0 12.0 12.0
src.Parser.parseTerm() 1.0 1.0 2.0 2.0
src.Parser.parsetri(boolean, String, ArrayList, BigInteger) 0.0 1.0 1.0 1.0
src.Simplefunc.setSimple(boolean, BigInteger, BigInteger) 2.0 1.0 2.0 2.0
src.Sinclass.getExpo() 0.0 1.0 1.0 1.0
src.Sinclass.getSins() 0.0 1.0 1.0 1.0
src.Sinclass.setExpo(BigInteger) 0.0 1.0 1.0 1.0
src.Sinclass.setSins(ArrayList) 0.0 1.0 1.0 1.0
src.Sinclass.Sinclass() 0.0 1.0 1.0 1.0
src.Sinclass.tostr() 1.0 1.0 1.0 2.0
src.Sinclass.toString() 1.0 1.0 2.0 2.0
src.Sumfunc.parsesum(String, int) 9.0 1.0 6.0 7.0
src.Sumfunc.Sumfunc() 0.0 1.0 1.0 1.0
src.Term.getBases() 0.0 1.0 1.0 1.0
src.Term.getContainers() 0.0 1.0 1.0 1.0
src.Term.Term() 0.0 1.0 1.0 1.0
src.Trigfunc.setTri(boolean, String, ArrayList, BigInteger) 4.0 1.0 4.0 4.0
Total 268.0 73.0 181.0 198.0
Average 3.8285714285714287 1.042857142857143 2.585714285714286 2.8285714285714287

### 3.4 类度量

class OCavg OCmax WMC
src.Base 3.857142857142857 14.0 27.0
src.Container 1.4 4.0 21.0
src.Cosclass 1.25 2.0 10.0
src.Customfunc 5.25 13.0 21.0
src.Expr 3.2 11.0 16.0
src.Lexer 2.25 5.0 9.0
src.Main 7.0 12.0 14.0
src.Parser 3.5714285714285716 11.0 25.0
src.Simplefunc 2.0 2.0 2.0
src.Sinclass 1.25 2.0 10.0
src.Sumfunc 4.0 7.0 8.0
src.Term 2.8333333333333335 12.0 17.0
src.Trigfunc 4.0 4.0 4.0
Total 184.0
Average 2.6285714285714286 7.615384615384615 14.153846153846153

## 4. 总结

### 4.2 心得体会

posted @ 2022-03-26 09:41  tiderem  阅读(27)  评论(0编辑  收藏  举报