英语学习助手数据库课程设计说明书.doc_第1页
英语学习助手数据库课程设计说明书.doc_第2页
英语学习助手数据库课程设计说明书.doc_第3页
英语学习助手数据库课程设计说明书.doc_第4页
英语学习助手数据库课程设计说明书.doc_第5页
已阅读5页,还剩26页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

中北大学课 程 设 计 说 明 书数据库大型实验周学生姓名:苗瑞林学 号:0906034216学生姓名:罗凡钰学 号:0906034250学生姓名:曹旭利学 号:0906034204学生姓名:黄丽学 号:0906034208学 院:专 业:题 目:英语学习助手指导教师: 职称: 2012 年 6月 22日1.设计目的随着社会的发展和时代的进步,英语已经成为人们在日常生活和工作中必须掌握和应用语言。为了更好、更快的掌握英语基础知识,尽快具备英语会话和写作能力,适应当前人们的工作、生活需要,推动英语学习的普及,所以我们小组集体开发了这套完整的英语学习助手,欢迎大家使用和提出改进意见。此系统主要实现了以下几大功能:后台:单词及单词例句信息管理(英语单词的录入、修改、删除); 前台:实现英语单词检索、翻译。英语单词自测,自测结果显示功能。2.设计内容 (1)主要的数据表用户表,英语分级单词表,常用单词例句表等等。(2)主要功能模块1)实现英语单词的录入、修改、删除等基本操作。2)实现常用英语单词例句的录入、修改、删除等基本操作。3)实现英语单词检索、翻译等。4)常用英语单词例句检索。5)随机生成一份单词测试题目。3.开发和运行环境介绍开发工具:Visual Studio 2010,SQL2008运行环境:Windows 9x 、Windows NT、Windows 2000、 Windowsxp 操作系统。4.需求分析4.1功能需求本系统的功能分为如下几大模块:1.单词模块:包括单词表的建立,单词的录入、修改、删除等基本操作。单词表包括单词和汉语翻译以及初级、中级、高级三种难度单词的分类。单词录入要求能够实现录入(增加)单词及其汉语翻译;修改要求能修改单词的拼写以及其汉语意思;删除即能够删除某一单词记录。2.例句模块:包括例句表的建立,例句的录入、修改、删除等基本操作。例句表包括例句及其中文翻译等。例句录入要求能够实现录入(增加)例句及其汉语翻译;修改要求能修改例句的单词以及其汉语意思;删除即能够删除某一例句记录。3.试题模块:随机生成一份相应难度的单词测试表。可以给出英文单词选择其正确的汉语翻译 4.检索模块:包括单词检索和例句检索,。单词检索要实现输入一个单词,可以检索出它的汉语翻译。例句检索要能实现输入句子,可以检索出其中文翻译。4.2 性能需求(1)尽量采取学校现有软硬件环境,及先进的管理系统开发方案,从而达到充分利用学校现有资源,提高系统系统开发水平的目的。(2)系统应符合学校学生现有的多媒体条件,满足学生日常英语学习的需要,并达到操作过程的直观,方便,实用等要求。(3)系统采用模块化程序设计方法,既便于系统功能的各种组合和修改。4.3 数据流图(1)顺序图显示界面数据库用户输入账号密码验证登录信息符合,登录成功不符合,登录失败图1顺序图(2)E-R图英语学习助手单词例句翻译关键单词单词编号编号句子等级翻译图2 E-R图5.系统设计与实现(写清楚每个人负责的模块)5.1 模块功能描述 苗瑞林:自测,实现单词和例句的修改 罗凡钰:实现单词和例句的检索 曹旭利:实现例句的录入,删除 黄丽:实现单词的录入,删除5.2 软件实现 黄丽:实现单词的录入,删除添加单词:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Windows.Forms;namespace WindowsFormsApplication1 public partial class Form1 : Form public Form1() InitializeComponent(); private void Form1_Load(object sender, EventArgs e) private void btnYes_Click(object sender, EventArgs e) string word = textBox1.Text; string fanyi=textBox2.Text; string dengji=textBox3.Text; string Num = textBox4.Text; string Constr = server = .;database=ENGLISHWORD;uid=sa;pwd=123; SqlConnection con = new SqlConnection(Constr); string sql = String.Format(INSERT INTO word(Num,word,fanyi,dengji) VALUES(0,1,2,3),Num,word,fanyi,dengji); con.Open(); SqlCommand cmd = new SqlCommand(sql, con); int count = cmd.ExecuteNonQuery(); if (count0) MessageBox.Show(添加英语单词成功!,添加成功, MessageBoxButtons.OK,MessageBoxIcon.Information); else MessageBox.Show(添加失败!,添加失败, MessageBoxButtons.OK,MessageBoxIcon.Information); private void lblWord_Click(object sender, EventArgs e) private void btnClose_Click(object sender, EventArgs e) Form3 ss = new Form3(); ss.Show(); this.Visible = false; 删除单词:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Windows.Forms;namespace WindowsFormsApplication1 public partial class Form4 : Form public Form4() InitializeComponent(); private void Form4_Load(object sender, EventArgs e) string Constr = server = .;database=ENGLISHWORD;uid=sa;pwd=123; SqlConnection con = new SqlConnection(Constr); string sql = select * from word; con.Open(); SqlDataAdapter adpt=new SqlDataAdapter(sql, con); DataTable dt=new DataTable(); adpt.Fill(dt); dataGridView1.DataSource = dt; private void button1_Click(object sender, EventArgs e) string id = dataGridView1.Rows0.Cells0.Value.ToString(); string Constr = server = .;database=ENGLISHWORD;uid=sa;pwd=123; SqlConnection con = new SqlConnection(Constr); string sql = DELETE from word WHERE Num=+id+; string sql1 = SELECT * FROM word; con.Open(); SqlCommand cmd = new SqlCommand(sql, con); if (cmd.ExecuteNonQuery() 0) string message = String.Format(删除成功, cmd.ExecuteNonQuery(); MessageBox.Show(message, 删除成功, MessageBoxButtons.OK, MessageBoxIcon.Information); SqlDataAdapter adpt = new SqlDataAdapter(sql1,con); DataTable dt = new DataTable(); adpt.Fill(dt); dataGridView1.DataSource = dt; private void button2_Click(object sender, EventArgs e) Form3 ssi = new Form3(); ssi.Show(); this.Visible = false; private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) 曹旭利:实现例句的录入,删除添加例句:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Windows.Forms;namespace WindowsFormsApplication1 public partial class Form7 : Form public Form7() InitializeComponent(); private void Form7_Load(object sender, EventArgs e) private void btnYes_Click(object sender, EventArgs e) string sentence = textBox1.Text; string fanyi = textBox2.Text; string sword = textBox3.Text; string Num = textBox4.Text; string Constr = server = .;database=ENGLISHWORD;uid=sa;pwd=123; SqlConnection con = new SqlConnection(Constr); string sql = String.Format(INSERT INTO sentence(Num,sentence,fanyi,sword) VALUES(0,1,2,3), Num, sentence, fanyi, sword); con.Open(); SqlCommand cmd = new SqlCommand(sql, con); SqlCommand command = new SqlCommand(sql, con); if (cmd.ExecuteNonQuery() 0) MessageBox.Show(添加英语例句成功!, 添加成功, MessageBoxButtons.OK, MessageBoxIcon.Information); else MessageBox.Show(添加失败!, 添加失败, MessageBoxButtons.OK, MessageBoxIcon.Information); private void lblSword_Click(object sender, EventArgs e) private void button2_Click(object sender, EventArgs e) Form3 ss = new Form3(); ss.Show(); this.Visible = false; 删除例句:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Windows.Forms;namespace WindowsFormsApplication1 public partial class Form9 : Form public Form9() InitializeComponent(); string Constr = server = .;database=ENGLISHWORD;uid=sa;pwd=123; SqlConnection con = new SqlConnection(Constr); string sql = select * from sentence; con.Open(); SqlDataAdapter adpt = new SqlDataAdapter(sql, con); DataTable dt = new DataTable(); adpt.Fill(dt); dataGridView1.DataSource = dt; private void button3_Click(object sender, EventArgs e) string Constr = server = .;database=ENGLISHWORD;uid=sa;pwd=123; SqlConnection con = new SqlConnection(Constr); string sql = select * from sentence; con.Open(); SqlCommand cmd = new SqlCommand(sql, con); cmd.ExecuteNonQuery(); private void textBox1_TextChanged(object sender, EventArgs e) private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) private void button2_Click_1(object sender, EventArgs e) Form3 ssi = new Form3(); ssi.Show(); this.Visible = false; private void button1_Click_1(object sender, EventArgs e) string id = dataGridView1.Rows0.Cells0.Value.ToString(); string Constr = server = .;database=ENGLISHWORD;uid=sa;pwd=123; SqlConnection con = new SqlConnection(Constr); string sql = DELETE from sentence WHERE Num= + id + ; string sql1 = SELECT * FROM sentence; con.Open(); SqlCommand cmd = new SqlCommand(sql, con); if (cmd.ExecuteNonQuery() 0) string message = String.Format(删除成功, cmd.ExecuteNonQuery(); MessageBox.Show(message, 删除成功, MessageBoxButtons.OK, MessageBoxIcon.Information); SqlDataAdapter adpt = new SqlDataAdapter(sql1, con); DataTable dt = new DataTable(); adpt.Fill(dt); dataGridView1.DataSource = dt; private void Form9_Load(object sender, EventArgs e) 罗凡钰:实现单词和例句的检索检索单词:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Windows.Forms;namespace WindowsFormsApplication1 public partial class Form2 : Form public Form2() InitializeComponent(); private void button1_Click(object sender, EventArgs e) string Constr = server = .;database=ENGLISHWORD;uid=sa;pwd=123; SqlConnection con = new SqlConnection(Constr); con.Open(); string word = textBox1.Text; string sql = String.Format(select fanyi from word where word=0, word); SqlCommand cmd = new SqlCommand(sql, con); string wordone = Convert.ToString(cmd.ExecuteScalar(); textBox2.Text =wordone; bool row = cmd.ExecuteScalar()!=null; if (row) string message = String.Format(查询成功, cmd.ExecuteNonQuery(); MessageBox.Show(message, 查询成功, MessageBoxButtons.OK, MessageBoxIcon.Information); else MessageBox.Show(查询失败!, 查询失败, MessageBoxButtons.OK, MessageBoxIcon.Information); private void button2_Click(object sender, EventArgs e) Form3 asd = new Form3(); asd.Show(); this.Visible = false; private void Form2_Load(object sender, EventArgs e) 例句检索:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace WindowsFormsApplication1 public partial class Form11 : Form public Form11() InitializeComponent(); private void button1_Click(object sender, EventArgs e) string Constr = server = .;database=ENGLISHWORD;uid=sa;pwd=123; SqlConnection con = new SqlConnection(Constr); con.Open(); string word = textBox1.Text; string sql = String.Format(select fanyi from sentence where sentence=0, word); SqlCommand cmd = new SqlCommand(sql, con); string wordone = Convert.ToString(cmd.ExecuteScalar(); textBox2.Text = wordone; bool row = cmd.ExecuteScalar() != null; if (row) string message = String.Format(查询成功, cmd.ExecuteNonQuery(); MessageBox.Show(message, 查询成功, MessageBoxButtons.OK, MessageBoxIcon.Information); else MessageBox.Show(查询失败!, 查询失败, MessageBoxButtons.OK, MessageBoxIcon.Information); private void button2_Click(object sender, EventArgs e) Form3 asd = new Form3(); asd.Show(); this.Visible = false; 苗瑞林:自测,实现单词和例句的修改单词修改:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace WindowsFormsApplication1 public partial class Form5 : Form public Form5() InitializeComponent(); string Constr = server = .;database=ENGLISHWORD;uid=sa;pwd=123; string sql = select * from word; SqlConnection con = new SqlConnection(Constr); con.Open(); SqlDataAdapter adpt = new SqlDataAdapter(sql, con); DataTable dt = new DataTable(); adpt.Fill(dt); dataGridView1.DataSource = dt; private void Form5_Load(object sender, EventArgs e) private void button2_Click(object sender, EventArgs e) string num = textBox1.Text; string num1 = textBox2.Text; string num2 = textBox3.Text; string num3 = textBox4.Text; string Constr = server = .;database=ENGLISHWORD;uid=sa;pwd=123; SqlConnection con = new SqlConnection(Constr); string sql = Update word set word=+num1+,fanyi=+num2+, dengji=+num3+ where Num=+num+; con.Open(); try SqlCommand cmd = new SqlCommand(sql, con); int count = cmd.ExecuteNonQuery(); if (count0) MessageBox.Show(修改英语单词成功!,修改成功, MessageBoxButtons.OK,MessageBoxIcon.Information); else MessageBox.Show(修改失败!,修改失败, MessageBoxButtons.OK,MessageBoxIcon.Information); catch (Exception ex) MessageBox.Show(ex.Message,操作数据库出错!, MessageBoxButtons.OK,MessageBoxIcon.Exclamation); finally con.Close(); private void button1_Click(object sender, EventArgs e) Form3 sw = new Form3(); sw.Show(); this.Visible = false; private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) 例句修改:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Windows.Forms;namespace WindowsFormsApplication1 public partial class Form10 : Form public Form10() InitializeComponent(); private void button1_Click(object sender, EventArgs e) string num = textBox1.Text; string num1 = textBox2.Text; string num2 = textBox3.Text; string num3 = textBox4.Text; string Constr = server = .;database=ENGL

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论