《面向对象程序设计(C)》(双语)_第1页
《面向对象程序设计(C)》(双语)_第2页
《面向对象程序设计(C)》(双语)_第3页
《面向对象程序设计(C)》(双语)_第4页
《面向对象程序设计(C)》(双语)_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

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

文档简介

1、面向对象程序设计(C+)(双语)课程教学大纲课程编号:03874制定单位:信息管理学院制 定 人(执笔人):丁菊玲审 核 人:杨勇制定(或修订)时间:2008年9月2日江西财经大学教务处面向对象程序设计(C+)(双语)课程教学大纲一、课程总述课程名称面向对象程序设计(C+)(双语)课程代码 03874课程性质 专业基础课先修课程程序设计基础总学时数64(含实验32学时)周学时数4(2+2)开课院系信息管理学院任课教师面向对象程序设计(C+)课程组编 写 人丁菊玲编写时间2008年9月课程负责人杨勇大纲主审人杨勇使用教材Bjarne StroustrupThe C+ Programming La

2、nguage(Special Edition) Higher Education Press (2003年7月出版)教学参考资料(1) 裘宗燕译 C+程序设计(特别版)机械工业出版社 (2002年7月出版)(2) 裘宗燕译 C+语言的设计与演化机械工业出版社 (2002年1月出版)(3) 钱能主编 C+程序设计教程 清华大学出版社 (2005年9月出版)(4) 刘宗田译 C+编程思想(第2版)机械工业出版社 (2002年9月出版)(5) 郑莉主编 C+语言程序设计 清华大学出版社 (2003年12月出版)课程教学目的The objective of this course is to help

3、 the student grasp the basic idea, knowledge and technique of the object oriented programming (OOP) language. After learning the course, the student can solve the practical problems appeared in their work with this advanced language and its software technique. The main content of this course is C+ p

4、rogramming language and the kernel characteristics of this language are abstract, encapsulation, inheritance, and polymorphism, which can be regarded as the base of the OOP programming. 课程教学要求This course is practical, which means we should combine the learning and practice. During the course, the co

5、nception and the programming technique as well as many typical examples are included. In the experimental course, the student should finish the task assigned to them with the C+ language they have learned from the course. Through this way, the student can deeply understand the C+ language and can ma

6、ster the compiling, linking and running procedures of the language. In a word, many exercises and practices are very important for the student to learn and understand the language well. 本课程的重点和难点The emphases of this course are to help the student grasp the core idea of the OOP language, which includ

7、es the above mentioned four aspects. Therefore, chapters about these aspects the most important parts of the course. The difficulties of this course are the class designing, inheritance and polymorphism. The student will feel some trouble in solving the practical problem with the data abstraction me

8、chanisms especially with the pure virtual functions.课程考试 The final mark of every student includes three parts: experimental reports take 20 percent, large scale homework takes 20 percent, and the final examination takes 60 percent. The paper examination is closed which consists of full English and t

9、he student should answer all the questions with only English. 二、教学时数分配章 目教 学 内 容教学时数分配课堂讲授实验(上机)一A tour of C+22二A tour of the standard library22三Array and pointer22四Functions, Pointer to Function24五Macros, Namespace20六Templates20七OOP4 4八Classes and Objects4 4九Operator overloading44十Derived classes44

10、十一Virtual Functions and Pure Virtual Functions46合 计3232三、单元教学目的、教学重难点和内容设置1A tour of C+(C+概述)(理论2课时,实验2课时)l 教学目的通过本章学习,了解C和C+的联系和区别,掌握和理解C+基本语法,能够编写自己的第一个C+应用程序。l 教学内容1.1 Procedural program and modular program(结构化、模块化程序设计)1.2 Data abstraction definition(数据抽象定义)1.3 Language and programming(语言与程序设计)1.

11、4 Introduction to C+ grammar(C+语法基础)l 重点难点本章重点为C+的语法基础、设计和使用;难点为C和C+的联系与区别。l 实验内容实验1:实现一个简单的菜单程序。要求:运行时显示“Menu:A(dd) D(elete) S(ort) Q(uit), Select one:”提示用户输入,A表示增加,D表示删除,S表示排序,Q表示退出,输入A,D,S时分别提示“数据已经增加、删除、排序”;输入Q时程序结束。要求使用ifelse语句进行判断,用break、continue控制程序流程。2A tour of the standard library(标准库概述)(理论

12、2课时,实验2课时)l 教学目的通过本章学习,掌握和理解C+基本输入输出以及标准库的相关概念。l 教学内容2.1 Output and input in C+(C+输入输出)2.2 The iterators of standard library(标准库中的指针)2.3 Algorithms and the function of STL (标准库中的算法和函数)l 重点难点掌握常用的几种标准库,如string、vector、list和map等。l 实验内容实验2:用 C+语言编写计算图形面积的程序。要求:程序可计算圆形、长方形、正方形的面积,运行时先提示用户选择图形的类型,然后,要求用户对

13、圆形输入半径,对长方形输入长和宽,对正方形输入边长,计算的面积值通过标准输出打印在屏幕上。 3Array and pointer(数组和指针)(理论2课时,实验2课时)l 教学目的通过本章学习,掌握和理解数组和指针的定义以及怎样使用数组和指针。l 教学内容3.1 One dimension array(一维数组)3.2 Two dimension array(二维数组)3.3 Multi dimension array(多维数组)3.4 Array and functions(数组和函数)3.5 Pointer operation(指针运算)3.6 New and delete operati

14、on(New和delete操作符)l 重点难点掌握数组、指针的使用。l 实验内容实验3:用两种不同的方法编写矩阵转置函数。要求:用数组保存矩阵;用动态内存分配生成动态数组设计,使用指针实现函数功能。4Functions, Pointer to Function(函数和函数指针)(理论2课时,实验4课时)l 教学目的通过本章学习,掌握和理解函数的定义和参数传递机制以及函数指针的具体使用。l 教学内容4.1 Function declarations and definitions(函数声明和定义)4.2 Inline function(内联函数)4.3 Static variables(静态变量

15、)4.4 Argument passing in the function(函数中的参数传递)4.5 Function overloading(函数重载)4.6 Default argument(默认参数)l 重点难点本章重点为函数的参数传递机制,内联函数的使用;难点为函数的重载机制。l 实验内容实验4:函数和函数重载的使用。(1) 用两种不同的方法编写矩阵转置函数。要求:用数组保存矩阵;用动态内存分配生成动态数组设计,使用指针实现函数功能。(2) 请设计一个print函数,重载该函数,使其能够打印多种图形(长方形、正方形、圆形等)的周长。5Macros, Namespace(宏、名字空间)(

16、理论2课时)l 教学目的通过本章学习,掌握和理解C+中宏的使用,名字空间的定义和使用。l 教学内容5.1 Macros in C+(宏)5.2 The definition of namespace (名字空间的定义)5.3 Using declarations and directives for namespace(名字空间的使用声明和指令)l 重点难点宏和名字空间的使用。6Templates(模板)(理论2课时)l 教学目的通过本章学习,掌握和理解模板机制,学会如何使用模板进行程序设计。l 教学内容6.1 Templates and instantiations(模板和实例)6.2 Fu

17、nction templates and function template overloading(函数模板和函数模板重载)6.3 Derivation and templates(派生和模板)6.4 Member templates and source code organization(成员模板和源代码组织)l 重点难点模板的使用。7OOP(面向对象思想)(理论4课时,实验4课时)l 教学目的 通过本章学习,掌握和理解面向对象程序设计的思想,面向对象程序设计的方法,面向对象程序设计的特性。l 教学内容7.1 From Structured Programming to OOP(从结构化

18、程序设计到面向对象程序设计)7.2 Introduction to OOP(OOP概述)7.3 Abstract(抽象性)7.4 Encapsulation(封装性)7.5 Inheritance(继承性)7.6 Polymorphism(多态性)l 重点难点面向过程到面向对象程序设计思想的转变。l 实验内容实验5:面向对象程序分析与设计。(1) 设计大学选课系统中的所有类和对象,并要求用main函数测试。如将学生作为一个类,定义该类中的数据成员和成员函数,并且定义该类的对象。(2)“把大象装在冰箱里”这件事情应该怎么样去用C+语言描述,试着描述它。 8Classes and Objects(

19、类和对象)(理论4课时,实验4课时)l 教学目的 通过本章学习,掌握和理解类和对象的定义、声明和使用;掌握构造函数、析构函数的定义和使用,能够用本章所学习的相关知识分析和解决实际问题。l 教学内容8.1 The definition and declaration of Class (类的定义和声明)8.2 Accessing Manners(访问方式)8.3 Member of class (类成员)8.4 Copy-constructor(拷贝构造函数)8.5 Destructor(析构函数)8.6 Class combination(类组合)8.7 Static members(静态成员

20、)l 重点难点本章重点为类的使用,类中成员的访问方式,构造函数以及析构函数的使用机制。l 实验内容实验6:类和对象的使用。(1) 学会类和对象的定义和使用:有一个Computer类,该类具有数据成员和成员函数。数据成员有cpu, ram, cdrom等;有两个公有成员函数run和stop。cpu为CPU类的一个对象,ram为RAM的一个对象,cdrom为CDROM的一个对象,声明并实现这个类。(2) 构造函数和析构函数的使用:某商店经销一种货物,货物成箱购进,成箱卖出,购进和卖出时以重量为单位,各箱的重量不一样,因此,商店需要记录下目前库存货物的总重量,要求用C+语言来模拟商店货物购进和卖出的

21、情况。 9Operator Overloading(运算符重载)(理论4课时,实验4课时)l 教学目的 通过本章学习,掌握和理解重载的含义,运算符重载的灵活应用,转换运算符的正确使用,掌握友元机制的使用。l 教学内容9.1 The requirement of operator overloading(运算符重载条件)9.2 Operator function(运算符函数)9.3 How to overload operator (怎样重载运算符)9.4 Conversion operator(运算符转换)9.5 Members and friends(成员和友元)9.6 Overloadin

22、g for other operators(其他运算符重载)l 重点难点运算符重载的使用,友元的使用。l 实验内容实验7:运算符重载的使用。(1) 定义复数的“+”和“-”运算,使之能够进行以下运算: complex a(2, 5), b(7, 8), c(0, 0); c=a+b; c=4.1+a; c=b+5.6(2) 定义复数类中的转换运算符和赋值运算符的重载,使之能够实现复数的基本运算(加,减,乘,除等)和复数之间的赋值操作。 10Derived Classes(派生类)(理论4课时,实验4课时)l 教学目的 通过本章学习,学会从现有类派生出新类的方式;了解基类成员在派生类中的访问控制方式;熟悉派生类中构造函数和析构函数的调用顺序;掌握多重继承及其产生的二义性问题。l 教学内容10.1 Introduction(概述)10.2 Single-inherit(单一继承)10.3 Modes of inherit(继承方式)10.4 Multi-inherit(多重继承)10.5 Multi-inherit with inline object(内联对象多继承)10.6 Ambiguity(二义性)l 重点难点本章重点为继承时成员的访问控制,构造函数和析构函数的调用,难点在于多重继承中产生

温馨提示

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

评论

0/150

提交评论