徐碧贏+張松泓
摘 要:學(xué)生上課考勤是教學(xué)過(guò)程中不可缺少的重要環(huán)節(jié),各任課教師需要依靠點(diǎn)名來(lái)掌握學(xué)生的考勤情況,并通過(guò)課堂提問(wèn)來(lái)了解學(xué)生對(duì)于課程的掌握情況。新時(shí)代下學(xué)生個(gè)性強(qiáng)、上課回答問(wèn)題積極性不高是當(dāng)代大學(xué)生的普遍特點(diǎn),為提高課堂教學(xué)的趣味性,以及學(xué)生課堂互動(dòng)的積極性,設(shè)計(jì)了一款課堂互動(dòng)隨機(jī)點(diǎn)名系統(tǒng)。該系統(tǒng)是基于C#設(shè)計(jì)開(kāi)發(fā)的,界面簡(jiǎn)潔,使用方便,提高了課堂點(diǎn)名的效率并活躍了課堂氛圍。
關(guān)鍵詞:隨機(jī)點(diǎn)名;課堂互動(dòng);Visual C#
中圖分類號(hào):TP311 文獻(xiàn)標(biāo)識(shí)碼:A
Abstract:The attendance of students is an indispensable part in the teaching process.Teachers need to rely on the roll call to check student attendance,and apply questioning to learn about the students' mastery of the course content.Generally,many college students lack enthusiasm for answering questions in class.A random roll call system for classroom interaction is designed in order to enhance students' interest and initiative of classroom interaction.The system is designed and developed based on C #.With the simple and user-friendly interface,the system effectively improves the efficiency of roll call and brings active and harmonious classroom atmosphere.
Keywords:random roll call;classroom interaction;Visual C#
1 引言(Introduction)
高校上課過(guò)程中,點(diǎn)名是教學(xué)過(guò)程中不可缺少的一部分,課堂提問(wèn)更是促進(jìn)教學(xué)互動(dòng),提高教學(xué)質(zhì)量的重要環(huán)節(jié)[1]。傳統(tǒng)的教學(xué)過(guò)程中多采用舉手或者紙質(zhì)版點(diǎn)名冊(cè)提問(wèn)的方法,前者往往使得一部分不愿意學(xué)習(xí)的同學(xué)在上課期間不愿意思考,后者則在點(diǎn)名過(guò)程中容易加入老師個(gè)人的感情色彩,尤其是在現(xiàn)階段,當(dāng)代大學(xué)生課堂互動(dòng)性差是普遍存在的問(wèn)題。為了解決這種現(xiàn)狀,活躍課堂氣氛,提高學(xué)生上課互動(dòng)的積極性,設(shè)計(jì)開(kāi)發(fā)了一款簡(jiǎn)易的課堂互動(dòng)隨機(jī)點(diǎn)名系統(tǒng)。
2 系統(tǒng)分析(System analysis)
本系統(tǒng)使用Microsoft Visual Studio的Visual C#進(jìn)行開(kāi)發(fā)設(shè)計(jì)[2],界面簡(jiǎn)單,使用方便,能夠?qū)崿F(xiàn)讀取TXT文檔中的學(xué)生名單,隨機(jī)抽取,并記錄抽樣信息的功能。系統(tǒng)結(jié)構(gòu)及功能如圖1所示。
(1)讀取TXT文檔
任課教師往往教授的班級(jí)不止一個(gè),因此系統(tǒng)需要實(shí)現(xiàn)能夠選取不同班級(jí)進(jìn)行隨機(jī)抽樣的功能,此時(shí)可以將各班的學(xué)生名單放置在TXT文檔中,并將文檔以班級(jí)命名,方便教師點(diǎn)名。
(2)隨機(jī)點(diǎn)名
此部分為本次設(shè)計(jì)的重點(diǎn),即要從學(xué)生名單中隨機(jī)讀取信息,同時(shí)在隨機(jī)讀取一次后為了保證隨機(jī)的同時(shí),已被點(diǎn)過(guò)名的同學(xué)在點(diǎn)名信息清除之前或者全部同學(xué)都被點(diǎn)到之前不會(huì)再次被點(diǎn)到,做到隨機(jī)點(diǎn)名的公平性。
(3)記錄點(diǎn)名信息
每次提問(wèn)或者點(diǎn)名的信息都將會(huì)自動(dòng)記錄下來(lái),方便老師考勤記錄。
3 軟件界面及功能設(shè)計(jì)(Software interface and
functional design)
本系統(tǒng)采用Windows窗體界面設(shè)計(jì)[3],界面設(shè)計(jì)效果如圖2所示。
系統(tǒng)主要功能部分包括:
(1)CoboBox1:可用來(lái)選擇需要點(diǎn)名的學(xué)生班級(jí)。
(2)Button1:即開(kāi)始點(diǎn)名按鈕,用來(lái)控制點(diǎn)名時(shí)隨機(jī)抽取,當(dāng)點(diǎn)下開(kāi)始按鈕開(kāi)始隨機(jī)點(diǎn)名后,其會(huì)變成停止按鈕,再次按下停止按鈕,則會(huì)顯示最終被點(diǎn)的學(xué)生姓名。
(3)listBox1:此部分主要用來(lái)存放并顯示所有同學(xué)被點(diǎn)信息。
(4)Button2:即清除按鈕,當(dāng)結(jié)束一次點(diǎn)名后用來(lái)清除listBox1中所顯示的數(shù)據(jù)信息。
(5)timer1:用來(lái)控制抽取過(guò)程中數(shù)據(jù)在空白處閃動(dòng),并在結(jié)束后顯示出被點(diǎn)學(xué)生姓名。
在開(kāi)始點(diǎn)名之前,需將保存各班名單的TXT文檔放置在與所設(shè)計(jì)的隨機(jī)點(diǎn)名軟件同一目錄下。此時(shí)當(dāng)訪問(wèn)CoboBox1即班級(jí)選項(xiàng)時(shí),下拉菜單中會(huì)自動(dòng)讀取軟件所在目錄中各班級(jí)名單的TXT文檔,如圖3所示。
4 程序設(shè)計(jì)(The program design)
本系統(tǒng)使用Visual C#語(yǔ)言設(shè)計(jì)開(kāi)發(fā)[4],界面簡(jiǎn)潔,方便易用,在程序設(shè)計(jì)方面主要包含幾個(gè)方面。
(1)使用CoboBox1控件選擇所要點(diǎn)名的班級(jí)信息。
public Form1()
{InitializeComponent();
string[] files=Directory.GetFiles(Application.StartupPath);//得到目錄下所有文件
this.cb_class.Items.Clear();
foreach (string pfilename in files)endprint
{string extension=Path.GetExtension(pfilename).ToLower();//得到文件擴(kuò)展名
if(extension==".txt")
{string temp=pfilename;
int start=pfilename.LastIndexOf("\\")+1;
temp=pfilename.Substring(start, pfilename.Length-start);//得到文件名
this.cb_class.Items.Add(temp);}}
timer1.Interval=10;
timer1.Stop();}
(2)單擊Button1即開(kāi)始點(diǎn)名按鈕會(huì)隨機(jī)抽取學(xué)生[5,6],隨后此按鈕顯示為停止,單擊后顯示被選中的學(xué)生姓名。
public partial class Form1:Form
{bool first_click=true;//初始化為真
int x,num;
Random r=new Random();
string fileclass="";
ArrayList content=new ArrayList();
ArrayList result=new ArrayList();
private void button1_Click(object sender, EventArgs e)
{if(this.cb_class.Text=="")
{MessageBox.Show("請(qǐng)選擇班級(jí)");}
else { first_click=!first_click;
if (!first_click)
{timer1.Start();
button1.Text="停止";}
else {timer1.Stop();
button1.Text="開(kāi)始點(diǎn)名";
while (result.Contains(content[x].ToString()))
{x=r.Next(0, num);
if(result.Count==num )
{MessageBox.Show("所有人都被點(diǎn)名過(guò)了");
break;}}
if (result.Count {result.Add(content[x].ToString()); this.listBox1.Items.Add(content[x].ToString());}} (3)在listBox1選框中可將此次選中的學(xué)生名單記錄下來(lái),方便老師記錄點(diǎn)名信息,點(diǎn)名結(jié)束后可單擊Button2即清除按鈕清除listBox1中所顯示的內(nèi)容。 private void cb_class_SelectedIndexChanged(object sender,EventArgs e) {fileclass=cb_class.SelectedItem.ToString(); if(!File.Exists(fileclass)){labelName.Text="名單不存在"; } StreamReader sr=new StreamReader(fileclass,Encoding. Default); //記得編碼 this.listBox1.Items.Clear(); content.Clear(); result.Clear(); string str1; while((str1=sr.ReadLine())!=null) {content.Add(str1);}} private void button2_Click(object sender, EventArgs e) {this.listBox1.Items.Clear(); result.Clear();} 5 結(jié)論(Conclusion) Visual Studio內(nèi)置編譯器使用方便,功能強(qiáng)大[7]。VS編譯后生成的EXE文件,可直接拷貝使用,無(wú)須再次安裝。教師在使用前,只需手動(dòng)將學(xué)生名單存放于與生成的EXE文件同目錄下的TXT文檔中即可。 本系統(tǒng)在功能需求中還存在一定的不足[8],可根據(jù)各任課老師的喜好進(jìn)行調(diào)整,提高系統(tǒng)的通用性,使得系統(tǒng)功能更加完善。 參考文獻(xiàn)(References) [1] Jennifer.F.A Cohort Perspective on Gender Gaps in College Attendance and Completion[J].Research in Higher Education, 2013,54(5):545-570. [2] Bharadwaj S,Vatsa M,Singh R.Biometric quality:a review of fingerprint,iris,and face[J].Eurasip Journal on Image & Video Processing,2014(1):1-28. [3] Lobantsov V V,Matveev I A,Murynin A B.A biometrical data quality analysis method to reliably evaluate the efficiency of recognition algorithms and systems[J].Pattern Recognition & Image Analysis,2012,22(4):593-598. [4] 馮婕,張娟,岳秋菊.基于Excel的課堂隨機(jī)點(diǎn)名系統(tǒng)的設(shè)計(jì)[J].自動(dòng)化與儀器儀表,2016(02):11-12. [5] 江泓政,等.基于人臉識(shí)別的課堂點(diǎn)名系統(tǒng)[J].微型機(jī)與應(yīng)用,2016(12):33-34. [6] 劉杰,張宏釗.基于VB和Speech SDK的課堂隨機(jī)語(yǔ)音點(diǎn)名系統(tǒng)設(shè)計(jì)[J].佛山科學(xué)技術(shù)學(xué)院學(xué)報(bào)(自然科學(xué)版),2014(02):25-26. [7] 朱濤.基于C#.NET的遠(yuǎn)程智能管理系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)[D].北京郵電大學(xué),2015. [8] 張燁.學(xué)生信息綜合管理系統(tǒng)的設(shè)計(jì)及實(shí)現(xiàn)[J].科技資訊,2017(01):13-15. 作者簡(jiǎn)介: 徐碧贏(1989-),女,碩士,助教.研究領(lǐng)域:信號(hào)與信息處理. 張松泓(1988-),男,碩士,助教.研究領(lǐng)域:農(nóng)機(jī)自動(dòng)化.