dfsservice面向对象程序设计实验指导书.docx
- 文档编号:28090062
- 上传时间:2023-07-08
- 格式:DOCX
- 页数:49
- 大小:228.08KB
dfsservice面向对象程序设计实验指导书.docx
《dfsservice面向对象程序设计实验指导书.docx》由会员分享,可在线阅读,更多相关《dfsservice面向对象程序设计实验指导书.docx(49页珍藏版)》请在冰豆网上搜索。
dfsservice面向对象程序设计实验指导书
面向对象的程序设计C++
Object-OrientedProgrammingLanguageC++
实验指导书
ExperimentInstructor
孙德强 编写
Editor:
DeQiangSun
包装工程专业本科生实验教学用
ForCollegeStudentsofPackagingEngineering
陕西科技大学
ShaanxiUniversityofScienceandTechnology
Contents
《面向对象程序设计》实验大纲
ExperimentsyllabusofObject-OrientedProgramming
一、制定实验教学大纲的依据
ConstitutionBaseofTheExperimentSyllabus
根据本校2007年7月制定的《面向对象程序设计》课程教学大纲制定。
Thisexperimentsyllabusofobject-orientedprogrammingisconstitutedaccordingtotheteachingsyllabusofthissubjectestablishedin2007.
二、本课程实验教学在培养学生实验能力中的地位和作用
PositionandFunctionofThisExperimentTeachingintheCultivationofStudents’ExperimentAbilities
《面向对象程序设计》是一门以C++语言为例来介绍面向对象编程思想的课程,是《包装CAD》课程的基础课,在包装所有课程中占有重要地位,是学生将来从事包装软件开发工作必须学习的一门骨干课程,本课程的试验部分在人才培养中的地位和作用:
OOPisthesubjectthatintroducesthecharacteristicsofOOPintheexampleofC++,andisabasiccourseofthesubjectnamedPackagingCAD.Itstandsontheimportantpositioninallpackagingcoursesandisabackbonesubjectforthestudentswhowanttodevelopthepackagingsoftware.Theexperimentpartofthissubjectalsoplaysanimportantroleinthecultivationofpersonswithability.
1、了解面向对象编程的基本思想、基本方法;
KnowaboutthebasicprincipleandmethodofOOP.
2、掌握利用VC进行C++语言程序设计的方法;
MasterthemethodsweusetodevelopthesoftwarewithVC.
3、掌握利用VC进行Windows控制台程序开发的方法;
MasterthemethodsweusetodevelopthewindowsconsolesoftwarewithVC.
4、学会C++实现面向对象编程的原理。
LearntheprinciplehowC++computerlanguagerealizationtheOOPtechnique.
三、本课程应讲授的基本实验理论
Thebasictheoriestheinstructorwilllecture
要求学生应该具备以下基本试验理论:
Thebasictheoriesstudentsmusthaveareinthefollowing
1、掌握C++语言面向对象编程的基本方法;
ThebasicmethodhowC++computerlanguagerealizestheOOPtechnique;
2、掌握利用VC编写程序的方法。
ThemethodsweusetodevelopthewindowsconsolesoftwarewithVC.
四、实验教学应达到的能力要求
Theabilityrequirementintheexperiments
要求学生应该具备以下能力:
Theabilitiesstudentsmusthavebeforedoingexperimentsarefollowing
1、熟悉Windows操作系统,具有基本的上机操作能力;
Knowwellthewindowsoperatingsystemandhavethebasiccomputeroperationability.
2、熟练C++语言,学会利用VC编写Windows控制台程序。
KnowwelltheC++Computerlanguage,andbeabletowritethewindowsconsoleprograms.
五、学时、教学文件
Instructinghoursandteachingfiles
学时:
本课程总学时为32学时,其中实验为14学时,占总学时的43.8%。
Instructinghours:
14experimenthoursofthetotal36hoursandtheproportionis43.8%.
教学文件:
西安交通大学出版社出版的《C++程序设计》和校编《面向对象程序设计实验指导书》;实验报告是直接演示软件。
Teachingfiles:
C++programdesignpublishedinXi’anJiaotongUniversityPressandthisinstructingmanual.
要求学生实验前预习参考资料。
指导教师应概述实验的原理、方法及设备使用等,具体测试步骤由学生独立完成。
Beforedoingexperiments,studentsshouldpreviewthereferencebookandtheinstructorshouldintroducetheexperimentprinciple,methodandhowtousethedevices.Thestudentsshouldfinishtheexperimentbythemselves.
六、实验考核办法与成绩评定
AssessmentMethods
每次实验单独考核,各次实验成绩平均为实验最后成绩,按40%记入课程的总成绩。
实验不合格者不得参加理论考试。
Everyexperimentisassessedforeveryoneandtheaverageofalltheexperimentsisthefinalscore.The40%oftheaveragescoreisaddedtothefinalscoreoftheOOPsubject.
七、仪器设备及注意事项
DevicesandNotices
仪器设备:
印刷包装工程学院图文信息处理中心VC开发平台。
Devices:
VCIntegratedDevelopmentEnvironmentInImageAndTextProcessingCenterOftheInstituteOfThePrintingAndPackagingEngineering.
注意事项:
注意保护设备
Notice:
Becarefulofthedevices.
八、实验项目的设置及学时分配
ConstitutionBaseofTheExperimentSyllabus
序号
No.
实验项目(ExperimentItems)
学时
(Instructing
hours)
类型
(Type)
要求(Requirement)
相关专业(RelatedMajor)
1
简单日期类和书籍类的设计
Designoftwoclasses——DateandBook
2
two
验证
Validating
必做
compulsory
包装工程
Packaging
engineering
2
构造函数和析构函数的设计
Designofconstructoranddestructor
2
two
设计
Designable
必做
compulsory
包装工程
Packaging
engineering
3
继承和派生的实现
Realizationofinheritanceandderivation
2
two
设计
Designable
必做
compulsory
包装工程
Packaging
engineering
4
友元函数和虚函数的编程
Programmingonfriendfunctionandvirtualfunction
2
two
验证
Validating
必做
compulsory
包装工程
Packaging
engineering
5
几种重载运算符的实现
Realizationofseveraloverloadedoperators
2
two
验证
Validating
必做
compulsory
包装工程
Packaging
engineering
制定人(Framer):
孙德强(DeQiangSun)
审核人(Assessor):
批准人(Ratifier):
制定日期(ConstitutingDate):
实验说明(SpecificationofTheExperiment)
一、实验要求(ExperimentRequirement)
在实验前后应注意(Noticesofthisexperiment):
1.实验开始前,认真研究实验项目所涉及的程序,并写出源代码;
Beforeexperiment,Studytheprogramsinthisexperimentandwritetheirsourcecodes.
2.上机开始力争在最短的时间内用计算机写好程序代码,任何人不能相互拷贝,避免雷同,如若雷同,雷同者本实验项目不合格;
Duringthecourseoftheexperiment,writeoutthesourcecodesintime.Anybodycan’tduplicatethesourcecodeseachotherandthestudentswhodosowillnotpassthisexperiment.
3.调试程序中,发现错误如若不能及时解决,应立刻求助指导老师;
Duringthedebuggingtheprogram,youmusthaverecoursetotheinstructorwhenyouencounterthedifficultquestions.
4.上机完成后,记好实验结果和源代码,以备写实验报告时使用;
Afterfinishingthisexperiment,writedowntheresultsandrightsourcecodesforpreparingtheexperimentreport.
5.任何人不能无故迟到、早退,更不能缺课,缺课者该实验项目不合格。
Anybodycan’tleaveearly,belateorabsentfornoreason,thestudentwhoisabsentfromtheexperimentwillnotpassit.
6.实验所用计算机最好固定,以便实现实验之间的延续性。
Everybodyshoulddoexperimentsonthesamecomputerstablyforthereasonofcontinuitybetweendifferentexperiments.
二、实验项目及其学时分配(ExperimentItems)
序号
实验项目(ExperimentItems)
Instructinghours
Type
Requirement
1
简单日期类和书籍类的设计
Designoftwoclasses——DateandBook
2
two
验证
Validating
必做
compulsory
2
构造函数和析构函数的设计
Designofconstructoranddestructor
2
two
设计
Designable
必做
compulsory
3
继承和派生的实现
Realizationofinheritanceandderivation
2
two
设计
Designable
必做
compulsory
4
友元函数和虚函数的编程
Programmingonfriendfunctionandvirtualfunction
2
two
验证
Validating
必做
compulsory
5
几种重载运算符的实现
Realizationofseveraloverloadedoperators
2
two
验证
Validating
必做
compulsory
三、实验报告及考核(ExperimentReportandAssessment)
上机实验完成后,每位同学都要上交一份实验报告,对实验报告内容及要求如下:
Afterexperiment,everyoneshouldhandinthereport.Therequirementsofthereportareinthefollowing.
1.实验报告必须具有实验项目名称、项目说明、关键程序代码、实验结果和实验总结等内容(具体格式见附件二)。
Thereportshouldhavemanyitems,suchasexperimenttitle,itemspecification,keysourcecodes,experimentresultsandexperimentsummary(referringtotheappendix2).
2.实验项目名称是指实验大纲中的实验项目;项目说明是程序设计原题;程序代码是你在实验中经调试能够运行的合法代码;实验结果是你运行完程序后的显示结果。
有些程序并没有要求你输出什么结果,此时你们可以在报告书中加以说明,比如“我设计了上述类后,假设在main()函数中有这样的代码,便可有如下的输出”。
Experimenttitlesrefertotheitemsintheexperimentsyllabusabove;specificationoftheitemistheinterpretationoftheexperimentitem;sourcecodesmustbedebugged;experimentresultsmustbesametotheresultsdisplayedonthescreen.Therequirementsofthereportareinthefollowing.Insomeexperiments,theresultsarenotdemanded,butatthistimeyoushoulddesignthemain()functiontousetheclasses.
3.实验心得是指当你的程序遇到不是你所想想的结果输出时,后来经过修改,达到了最终结果,你从中获得了的新的认识。
Whatyouhasleanedreferstoacquirementyougotduringthecourseofdoingtheexperiments.
4.实验报告应在本次实验完成结束后下次实验时交给指导老师,过期不候。
Afterexperiment,theexperimentreportmustbehandedinontime.
5.考勤记录上记录某位学生没有参加某次实验上机,那该同学也没有必要交实验报告,因为本次实验将按旷课论处。
Thestudenthasnonecessitytohandintheexperimentreportifhewasabsentfromthisexperiment,becauseinfacthedidn’tdothisexperiment.
6.任何同学之间不能相互抄袭,发现雷同实验报告,则所有抄袭者该实验报告成绩为零。
Everyonecan’tduplicatetheexperimentreportseachother,oralltheduplicators’scoreofthisexperimentiszero.
7.实验打分以考勤、实验和实验报告等情况打分,五次实验平均分以百分之40%的比例计入本门课的期末成绩。
Everyonegetsthescoreaccordingtoattendance,courseandreport,andthe40%oftheaveragescoreofthefiveexperimentsisaddedtothefinalscoreoftheOOPsubject.
实验一简单日期类和书籍类的设计
Designoftwoclasses——DateandBook
一、实验目的
ExperimentPurposes
本实验的目的有:
Theexperimentpurposesareinthefollowing.
1.了解面向对象编程的基本思想、基本方法;
KnowaboutthefundamentalprincipleandmethodofOOP.
2.掌握利用VC进行控制台程序设计的过程和方法;
GraspthecourseandmethodusedindevelopingtheconsoleapplicationwithVC.
3.掌握类和对象的基本概念及其相关程序设计。
Graspthebasicconceptsandrelativeprogramdesigns.
二、实验目标
ExperimentGoals
本实验的目标有:
Theexperimentgoalsareinfollowing.
1.掌握面向对象编程的基本思想、基本方法;
GraspthefundamentalprincipleandmethodofOOP.
2.掌握VC控制台程序设计的过程和方法;
GraspthecourseandmethodusedindevelopingtheconsoleapplicationwithVC.
3.实现日期类和书籍类,并编写其成员函数。
Realizethedateclassandbookclass,andwritetheirmemberfunctions.
三、实验条件
ExperimentConditions
在实验的条件有:
Theexperimentconditionsareinthefollowing
1.实验在印刷包装工程学院图文信息处理中心实验室进行;
ExperimentsarealldoneintheImageAndTextProcessingCenterOftheInstituteOfThePrintingAndPackagingEngineering.
2.软件用VC集成开发环境进行程序设计。
TheprogramsarealldevelopedintheVCintegrateddevelopmentenvironment.
四、实验内容及其原理
ExperimentContentandPrinciples
本实验的项目如下:
Theexperimentitemsareinthefollowingforthistime.
1.设计一个具有年、月、日等数据成员和相关成员函数(如设置日期和返回日期函数)的日期类。
最后你必须使用这一个类。
Designadateclasswiththeproperties,suchasyear,monthandday,andsomememberfunctions,suchasthefunctiontosetthedateandthefunctiongettingthedate.Atlastyoumustusethisclass.
2.设计一个具有书名、作者、出版社、出版日期和图书类型等数据成员和相关成员函数(如设置和返回某一数据成员的值)的书类。
最后你必须使用这一个类。
Designabookclasswiththeproperties,suchasbookname,author,press,publishingdateandbooktype,andsomememberfunctions,suchasthefunctionstosetsomepropertiesandthefunctionsgettingvaluesofoneproperties.Atlastyoumustusethisclass.
本实验的实验原理用到VC++6.0的编程原理和面向对象编程的思想,具体请参阅本书后面的附录一。
ThisexperimentprinciplesincludetheprogrammingprinciplesofVCandOOPthatcanbereferredtoinappendix1.
五、实验注意事项
Noticesofthisexperiment
在实验前后及实验过程中应注意:
Before,afterandduring
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- dfsservice 面向 对象 程序设计 实验 指导书