ImageVerifierCode 换一换
格式:DOCX , 页数:19 ,大小:20.68KB ,
资源ID:30100117      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/30100117.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(采购管理系统项目报告模板JAVA三级项目.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

采购管理系统项目报告模板JAVA三级项目.docx

1、采购管理系统项目报告模板JAVA三级项目大连东软信息学院三级项目报告课程名: JAVA语言程序设计实践项目: 采购管理系统项目学 院:大连东软信息学院组长姓名:指导教师:邵欣欣2013年6月10日第1章 构思请对系统的需求进行详细的介绍(150字以上)正文(以下章节凡语言描述部分都依照此格式要求)(格式要求:空两格、小四号宋体,1.5倍行距) 公司想投资研发新产品,生产制造并进行市场销售此种商品借此盈利。根据这样的问题,如何根据市场需求选择此种商品就成了需要解决的重要问题。于是借用随机数与switch选择语句结合,最终的选择结果用以模拟对市场进行调研的结果。由名为顺风耳的市场调查员来完成此工作

2、,最后根据他的调查结果开发并生产新产品。系统中有一个抽象的商品类(Goods),作为其子类的父类,定义所有产品所共有的属性和方法。之后每个商品作为该商品类的一个子类,定义其附加的属性、构造方法以及方法,并实现商品类中的抽象方法,用以模拟实现每一件商品的研发生产和销售过程。本小组项目中总共包含一个商品类Goods和六个具体的商品类Computer, XBox,Camera,Keyboard,Mobile phone作为该商品类的子类,实现具体商品的研发生产和销售过程。同时小组程序中还包含两个类。Market Inquirer类用以模拟市场行情的变化,并返回热销产品的名称。Factory类用以返回

3、创建该热销产品的对象,并用以实现具体的商品类中的研发,生产和销售的方法。最终用boss类创建各个类的对象并调用对应方法,最终实现该管理系统进行市场调研并根据调研结果开发新产品的目的。第2章 设计2.1应用的知识点(1)类与对象的创建,包括属性定义,方法定义和对象的创建。(2)访问权限修饰符的使用,包括默认修饰符和private,protected和public。方法和构造方法修饰符一般用public,属性一般为private,对于私有属性用访问器和设置器方法进行访问和修改。(3)无参构造方法的定义,给类中的属性对象赋初始值。创建对象中调用该构造方法,用于对象的初始化。(4)构造方法与一般方法的

4、区别。(5)对方法的调用:对象调用和类调用,有返回值的方法对方法的调用就当做处理一个值,没有返回值的调用就当做处理一条语句。(6)类的继承。Java是单重继承,每个类都有一个父类,未定义的则继承Object类。子类可以继承父类的属性和构造方法,子类可以添加新的属性和方法,子类可以重新定义父类的属性和方法。(7)子类是父类的特例,子类的对象也可以看做父类的对象。(8)子类中定义了一个与父类方法头相同的方法,称为方法的覆盖。子类方法与父类方法的修饰符可以不同,但是子类方法只能扩大父类方法中的访问权限。(9)抽象类只能用于继承,不能用于创建对象。(10)抽象方法(abstract修饰)只有方法头没有

5、方法体,只能定义在抽象类中,强制抽象方法必须在其子类中被实现。(11)子类中必须覆盖抽象类中的全部抽象方法。(12)this关键字用来指代当前类中的当前对象,可用来调用当前对象的成员。(this可以用来调用当前的构造方法,但必须写在构造方法中的第一条)。(13)Java包的引入。(14)数组的声明,初始化以及应用。(15)字符串的声明,初始化以及String类中的常用方法。2.2功能介绍项目主要通过作为父类的抽象类goods和作为子类的具体商品类Mobile Phone等的编写,模拟实现具体商品的研发生产制造功能。同时通过Market Inquire类实现模拟市场调研结果,用Factory类辅

6、助实现测试类功能的Boss类,利用多态性,创建对象并实现各个具体商品类之中研发,生产和销售的方法。同时本小组还利用极其有限的图形用户界面设计的知识在程序实现目的功能的基础之上进行了少部分的功能添加。导入JAVA中JDK中的抽象窗口工具集的Swing包,实践一个简单的“显示调研结果”事件处理。第3章 实施3.1类的编写GOOD类package 产品管理;publicabstractclass Goods protected String gno;protected String gname;protecteddoublegprice;abstractvoid research();/*生产制造*

7、/abstractvoid product();/*投入市场*/abstractvoid sell();package 产品管理;fatory类publicclass Factory publicstatic Goods fatory(String which) if (which.equalsIgnoreCase(camera) returnnew Camera(); elseif (which.equalsIgnoreCase(computer) returnnew Computer(); elseif (which.equalsIgnoreCase(mobilephone) return

8、new MobilePhone(); elseif (which.equalsIgnoreCase(XBox) returnnew XBox(); elseif (which.equalsIgnoreCase(Keyboard) returnnew Keyboard(); else returnnull; Keyboard类package 产品管理;publicclass Keyboard extends Goods protected String brand;protected String type;protectedinta; Keyboard() brand = 联想;type =

9、K123;gname = 键盘;gprice = 68; publicvoid research() for (int i = 0; i = 100; i+) a = (int) (Math.random() * 2 + 1); System.out.println(brand + type + gname + 正在研究开发中.);if (a = 1) System.out.println(brand + type + gname + 研发成功!);break; else System.out.println(brand + type + gname + 研发失败!即将进行重新研发); pub

10、licvoid product() a = (int) (Math.random() * 10000); System.out.println(brand + type + gname + 产品制造生产中); System.out.println(brand + type + gname + 已制造成功! + n + 共生产了 + a + 件 + brand + type + gname); publicvoid sell() System.out.println(brand + type + gname + 产品热销中); System.out.println(brand + type +

11、gname + 已经销售一空!); System.out.println(商品型号为: + type); System.out.println(商品名称为: + gname); System.out.println(商品品牌为: + brand); System.out.println(商品市场价格为: + gprice); MarketInquirer类package 产品管理;publicclass MarketInquirer String name; MarketInquirer(String name) this.name = name; /*该方法模拟市场行情的变化,并返回热销产品

12、的名称!*/public String inquirer() switch (int) (Math.random() * 6) /多重选择case 0: report(相机);returncamera;case 1: report(电脑);returncomputer;case 2: report(手机);returnmobilephone;case 3: report(XBox);returnXBox;case 4: report(键盘);returnKeyboard;default: report(键盘);returnKeyboard; privatevoid report(String

13、hotFruit) System.out.println(市场调研员 + name + 报告:经过周密调研,今年 + hotFruit + 会有好销路,请生产!); MobilePhone类package 产品管理;publicclass MobilePhone extends Goods /*添加需要的属性和构造方法*/protected String brand;protectedinta; MobilePhone() brand = HTC;gno = 111;gname = 智能手机;gprice = 1230; /*实现父类中的research()*/publicvoid resea

14、rch() for (int i = 0; i = 100; i+) a = (int) (Math.random() * 2 + 1); System.out.println(brand + gno + gname + 正在研究开发中);if (a = 1) System.out.println(brand + gno + gname + 研发成功!);break; else System.out.println(brand + gno + gname + 研发失败!即将进行重新研发); /*实现父类中的product()*/publicvoid product() a = (int) (M

15、ath.random() * 10000); System.out.println(brand + gno + gname + 正在制造生产中); System.out.println(brand + gno + gname + 已经制造成功! + n + 共生产了 + a + 件 + brand + gno + gname); /*实现父类中的sell()*/publicvoid sell() System.out.println(brand + gno + gname + 正在市场销售中); System.out.println(brand + gno + gname + 已经销售一空!)

16、; System.out.println(); System.out.println(商品品牌为: + brand); System.out.println(商品型号为: + gno); System.out.println(商品名称为: + gname); System.out.println(商品价格为: + gprice); Xbox类package 产品管理;publicclass XBox extends Goods protectedintb; XBox() gno = 10120900128;gname = XBox360;gprice = 1800; System.out.pr

17、intln(商品批号为: + gno); System.out.println(商品名为: + gname); System.out.println(市场价为: + gprice); int a = newint2;inti = 0;void num() ai = (int) (Math.random() * 2) + 1; void research() for (int i = 0; i = 100; i+) System.out.println(gno + gname + 正在研究中); num();if (ai = 1) System.out.println(gno + gname +

18、 研发失败!即将进行重新研发);else System.out.println(gno + gname + 研发成功!);break; void product() b = (int) (Math.random() * 10000); System.out.println(gno + gname + 正在生产中); System.out.println(gno + gname + 生产结束! + n + 共生产了 + b + 件 + gno + gname); void sell() System.out.println(gno + gname + 市场销售中); System.out.pri

19、ntln(gno + gname + 已经销售一空!); Camera类package 产品管理;publicclass Camera extends Goods /*添加需要的属性和构造方法*/protected String style;protectedinta; Camera() gno = 00001;gname = 相机;style = sony;gprice = 200; /*实现父类中的research()*/publicvoid research() for (int i = 0; i = 100; i+) a = (int) (Math.random() * 2 + 1);

20、 System.out.println(gno + style + gname + 正在研究开发中.);if (a = 1) System.out.println(gno + style + gname + 研发成功!);break; else System.out.println(gno + style + gname + 研发失败!即将进行重新研发); /*实现父类中的product()*/publicvoid product() a = (int) (Math.random() * 10000); System.out.println(gno + style + gname + 正在制造

21、生产中.); System.out.println(gno + style + gname + 已经制造成功! + n + 共生产了 + a + 件 + gno + style + gname); /*实现父类中的sell()*/publicvoid sell() System.out.println(gno + style + gname + 正在市场销售中.); System.out.println(gno + style + gname + 已经销售一空!); System.out.println(); System.out.println(商品型号为: + gno); System.o

22、ut.println(商品名称为: + gname); System.out.println(商品类型为: + style); System.out.println(商品市场价格为: + gprice); Computer类package 产品管理;publicclass Computer extends Goods /*添加需要的属性和构造方法*/protected String style;protectedinta; Computer() gno = 1000;gname = 笔记本电脑;style = 戴尔;gprice = 5500; /*实现父类中的research()*/publ

23、icvoid research() for (int i = 0; i = 100; i+) a = (int) (Math.random() * 2 + 1); System.out.println(gno + style + gname + 正在研究开发中.);if (a = 1) System.out.println(gno + style + gname + 研发成功!);break; else System.out.println(gno + style + gname + 研发失败!即将进行重新研发); /*实现父类中的product()*/publicvoid product()

24、 a = (int) (Math.random() * 10000); System.out.println(gno + style + gname + 正在制造生产中); System.out.println(gno + style + gname + 已经制造成功! + n + 共生产了 + a + 件 + gno + style + gname); /*实现父类中的sell()*/publicvoid sell() System.out.println(gno + style + gname + 正在市场销售中); System.out.println(gno + style + gna

25、me + 已经销售一空!); System.out.println(); System.out.println(商品型号为: + gno); System.out.println(商品名称为: + gname); System.out.println(商品品牌为: + style); System.out.println(商品市场价格为: + gprice); 3.2主程序的编写package 产品管理;import java.awt.*;import java.awt.event.*;import javax.swing.*;public class Boss implements Acti

26、onListener /* * 公司根据市场调查员的反馈,安排一年的生产计划! * param args */ JFrame frame; JDialog dialog; JButton button; String sname= ; public static void main(String args) System.out.println(请输入调研员姓名:); String sname = 顺风耳; Boss jd=new Boss(); jd.go(); sname=优秀市场调研员+sname+的调研结果为公司带来了巨大经济收益!; System.out.println(sname)

27、; public void go() MarketInquirer mi = new MarketInquirer(sname= MyInput.readString(); String hotFruit = mi.inquirer(); Goods g = Factory.fatory(hotFruit); frame=new JFrame(调研员); dialog=new JDialog(frame,调研反馈,true); JButton button1=new JButton(sname); JPanel contentPane=new JPanel(); contentPane.set

28、Layout(new BorderLayout(); contentPane.add(button1,BorderLayout.CENTER); frame.setContentPane(contentPane); frame.pack(); frame.setVisible(true); dialog.getContentPane().add(new JLabel(今年会有好销路的产品是:+hotFruit); dialog.setSize(250,150); button =new JButton(查看调研结果); button.addActionListener(this); Container cp=frame.getContentPane(); cp.add(button,BorderLayout.EAST); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(250,150); frame.setVisible(true); g.research();

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1