心理测试系统实现过程中的具体问题
这是一个心理测试系统
我想知道系统提示的错误怎么解决?
rb_1.text = "A" + maturity.questions[int_j].choices[0].getanswer()
提示:the property 'question' was found in class 'inventory', but insufficient rights are available to access it
(这应该就是不能访问内部类的私有属性的问题)
w_inventory.display(j) 代码在下面
提示:function with no return value used in expression
(display是窗口的一个函数,函数中用到了窗口的控件)
它的运行过程:
在窗口w_student点击一个按钮“个性成熟度测试”,会打开w_instruction窗口来对测试进行说明。
单击其上的“开始测试”后,打开w_inventory用于显示题目,25道测试题每次显示一题(包括5个选项,使用radiobutton来选择答案),做完后点击“下一题”按钮,
在原窗口显示下一题。最后一题中按钮上的字显示为“提交”。单击这个按钮后进行计分,并根据得分得出评价。
评价在窗口w_analysis中打开。
类结构如下:
试卷类(inventory,对象为maturity):名称(id:string)答题要求(discription:string)总分(mark:integer,用每道题的得分加出来)
问题(questions[25]:question)分析(analyze:analysis)
问题类(question对象为questions[]):序号(index:string)题目(title:string)本题得分(score:integer)选项(choices[5]:choice)
选项类(choice对象为choices[]):选项(option:char)答案(answer:string)分值(point:integer)
分析(analysis,对每个得分区间有不同的解释):评价(judgement:string)分析(construe:string)
也就是说,试卷包含问题,问题包含选项。
display(int_j) returns none
st_1.text = string(int_j+1)
st_3.text = maturity.questions[j].gettitle()
rb_1.text = "A" + maturity.questions[int_j].choices[0].getanswer()
rb_2.text = "B" + maturity.questions[int_j].choices[1].getanswer()
rb_3.text = "C" + maturity.questions[int_j].choices[2].getanswer()
rb_4.text = "D" + maturity.questions[int_j].choices[3].getanswer()
rb_5.text = "E" + maturity.questions[int_j].choices[4].getanswer()