《了解MIS的常用功能》实验报告.doc
《《了解MIS的常用功能》实验报告.doc》由会员分享,可在线阅读,更多相关《《了解MIS的常用功能》实验报告.doc(33页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、了解MIS的常用功能实验报告开课实验室:课外实践 2013 年 5月 12 日专业 工程管理班级工程管理1006学号P姓名欧丹成绩实验名称练习C1 利息计算练习C2 最优加工顺序练习C4 生成最小生成树; 练习C5 列车时刻表;练习C7 鱼口模拟;练习C6统计价格小于1000的产品数据。练习1.1利润计划编制实验项目了解MIS的常用功能指导教师李桂林一、实验目的了解MIS的常用功能;掌握各种MIS的操作方法。二、实验内容(1) 练习C6统计价格小于1000的产品数据。(2) 练习B1数据挖掘演示系统;(3) 练习C1 利息计算;(4) 练习C2 最优加工顺序;(5) 练习C4 生成最小生成树;
2、 (6) 练习C5 列车时刻表;(7) 练习C7 鱼口模拟;(8) 练习1.2 账务处理系统;(9) 练习C3 最小费用路径;(10)练习1.1利润计划编制三、实验结果练习C1 利息计算本实验的目的是已经本金和利率求利息,公式为利息=本金*(1+利率)年数需要确定的数是本金,利率和年份 打开VB软件,创建一个利息计算的窗口,在其中拉入7个Label标签框,1个Frame框架,3个TextBox文本框,2个CommandButton命令按钮,调节界面,如下图所示 据题目要求,输入代码,进行程序设计 运行程序,输入本金10000,利率3%,年数为3,检验是否正确,结果如图练习C2 最优加工顺序本实
3、验的目的是某车间有n个待加工零件,只有一台车床和一台铣床可供使用。这些零件都需要先车后铣,为了以最短时间完成加工任务,根据它们在各机床上加工所需工时, 试利用计算机排出最优加工顺序表。 打开VB软件,创建2个最优加工顺序的窗口和一个模块,定义所需加工的数量,窗体1拉入5个Label标签框和2个TextBox文本框,窗体2中拉入1个Label标签框和2个CommandButton命令按钮,按如下格式摆放 根据题目要求输入代码进行程序设计,分别对模块和2个窗体进行设计Option ExplicitDim NN As IntegerPrivate Sub Command1_Click() Dim i
4、 As Integer For i = 1 To NN If Text1(i).Text = Or Text2(i) = Or IsZs1(Text1(i) = False Or IsZs1(Text2(i) = False Then MsgBox 信息不全或非正数 Exit Sub End If Next i Dim PX() As Integer ReDim PX(NN + 1) Dim KT As Integer Dim JW As Integer For i = 0 To NN PX(i) = 0 Next i KT = 1 JW = NN Dim MIN As Long Dim MI
5、N_index As Integer gong jian hao MIN = MIN_index = 1 Dim MIN_sx As Integer na yi hang MIN_sx = 1 While KT JW MIN = For i = 1 To NN If isPaichu(i, PX) = False Then If CInt(Text1(i).Text) MIN Then MIN = CInt(Text1(i).Text) MIN_index = i MIN_sx = 1 End If If CInt(Text2(i).Text) MIN Then MIN = CInt(Text
6、2(i).Text) MIN_index = i MIN_sx = 2 End If End If Next i If MIN_sx = 1 Then PX(KT) = MIN_index KT = KT + 1 End If If MIN_sx = 2 Then PX(JW) = MIN_index JW = JW - 1 End If Wend For i = 1 To NN If isPaichu(i, PX) = False Then Exit For Next i PX(KT) = i Dim str As String str = 工件加工顺序是: For i = 1 To NN
7、str = str & & PX(i) Next i Label3.Caption = strEnd SubPrivate Sub Command2_Click() Unload Me End SubPrivate Sub Form_Load() Dim rrr As String rrr = InputBox(请输入待加工的零件数!) If rrr = Then Exit Sub NN = CInt(rrr) Dim Text1() As TextBox Dim Text2() As TextBox Dim i As Integer ReDim Text1(NN + 1) ReDim Tex
8、t2(NN + 1) For i = 1 To NN Load Text1(i) Text1(i).Visible = True Text1(i).Text = Text1(i).Move Text1(i - 1).Left + Text1(i - 1).Width, Text1(i - 1).Top, Text1(i).Width, Text1(i).Height Load Text2(i) Text2(i).Visible = True Text2(i).Text = Text2(i).Move Text2(i - 1).Left + Text2(i - 1).Width, Text2(i
9、 - 1).Top, Text2(i).Width, Text2(i).Height Load Lab(i) Lab(i).Visible = True Lab(i).Caption = & i Lab(i).Move Text2(i).Left, Lab(i - 1).Top, Lab(i).Width, Lab(i).Height Next i End SubPrivate Sub Command1_Click() Form1.Show Unload Me End SubPrivate Sub Command2_Click() Unload Me End SubPrivate Sub Fo
10、rm_Load()Label1.Caption = 某车间有n个待加工零件,只有一台车床和一台铣床可供使用。这些零件都需要先车后铣,为了以最短时间完成加工任务,根据它们在各机床上加工所需工时试利用计算机排出最优加工顺序表。End Sub 运行软件,分别输入2次,单位时间分别为10,11,12,13,运行的结果为顺序先后为1,2 练习C4 生成最小生成树本实验的是在八个城市之间建造电视微波中继站,可行线路旁的弧旁数字为费用,求建在哪个城市可实现连通每个城市且费用为最低。 打开VB软件,创建一个生成最小生成树的窗体,拉出2个Label标签框,3个CommandButton命令按钮,1个Pictur
11、eBox图片框,如图所示 根据题目要求,输入代码,具体如下:Option ExplicitPrivate Type LJ i As Integer j As Integer w As Integer flag As Boolean End TypePrivate Type code self As Integer father As IntegerEnd TypeDim xx(16) As LJ 边Dim cod(9) As code 根节点Private Sub PL(i As Integer, j As Integer) Dim xx1, xx2, yy1, yy2 As Integer
12、xx1 = City(i).Left + 0.5 * City(i).Width yy1 = City(i).Top + 0.5 * City(i).Height xx2 = City(j).Left + 0.5 * City(j).Width yy2 = City(j).Top + 0.5 * City(j).Height Pp.Line (xx1, yy1)-(xx2, yy2), RGB(0, 0, 255) End SubPrivate Sub PL2(i As Integer, j As Integer) Dim xx1, xx2, yy1, yy2 As Integer xx1 =
13、 City(i).Left + 0.5 * City(i).Width yy1 = City(i).Top + 0.5 * City(i).Height xx2 = City(j).Left + 0.5 * City(j).Width yy2 = City(j).Top + 0.5 * City(j).Height Pp.Line (xx1, yy1)-(xx2, yy2), RGB(255, 0, 0) End SubPrivate Sub Command1_Click() Dim total As Integer Dim num As Integer total = 0 总费用 num =
14、 0 记录最小生成树的边数 Dim i As Integer For i = 0 To 8 cod(i).self = i cod(i).father = 0 Next Dim min As Integer Dim x As Integer Dim y As Integer While num 7ooo: min = Minum() x = xx(min).i y = xx(min).j If SBoot(x) = SBoot(y) Then xx(min).flag = True MsgBox min & error GoTo ooo Else cod(SBoot(y).father = S
15、Boot(x) total = total + xx(min).w Call PL2(x, y) num = num + 1 xx(min).flag = True beep: beep: beep MsgBox x & , & y & , & total End If Wend label.Caption = 总费用为 & totalEnd SubPrivate Sub Command2_Click() label.Caption = Call PL(1, 2) Call PL(1, 4) Call PL(1, 6) Call PL(2, 4) Call PL(4, 6) Call PL(2
16、, 3) Call PL(2, 5) Call PL(4, 5) Call PL(4, 7) Call PL(6, 7) Call PL(7, 8) Call PL(5, 7) Call PL(5, 8) Call PL(3, 5) Call PL(3, 8) With xx(0) .i = 10 .j = 10 .w = 100 End With With xx(1) .i = 1 .j = 2 .w = 6 End With With xx(2) .i = 1 .j = 4 .w = 4 End With With xx(3) .i = 1 .j = 6 .w = 9 End With W
17、ith xx(4) .i = 2 .j = 4 .w = 2 End With With xx(5) .i = 6 .j = 4 .w = 6 End With With xx(6) .i = 6 .j = 7 .w = 4 End With With xx(7) .i = 4 .j = 7 .w = 7 End With With xx(8) .i = 5 .j = 7 .w = 11 End With With xx(9) .i = 7 .j = 8 .w = 5 End With With xx(10) .i = 2 .j = 5 .w = 13 End With With xx(11)
18、 .i = 5 .j = 8 .w = 3 End With With xx(12) .i = 3 .j = 8 .w = 7 End With With xx(13) .i = 3 .j = 5 .w = 5 End With With xx(14) .i = 2 .j = 3 .w = 10 End With With xx(15) .i = 4 .j = 5 .w = 7 End With Dim ii As Integer For ii = 0 To 15 xx(ii).flag = False Next ii Command1.Enabled = TrueEnd SubPrivate
19、 Function SBoot(x As Integer) As Integer Dim temp As Integer Dim pa As Integer pa = x temp = cod(x).father While temp 0 pa = temp temp = cod(pa).father Wend SBoot = paEnd FunctionPrivate Function Minum() As Integer Dim min As Integer Dim i As Integer min = 1 While xx(min).flag = True And min = 14 mi
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 了解MIS的常用功能 了解 MIS 常用 功能 实验 报告
限制150内