《高级语言程序设计C++(二)》教学大纲

课程代码

045101991

课程名称

高级语言程序设计C++(二)

英文名称

Advanced Language Programming(C++) (2)

课程类别

公 共 基 础 课

课程性质

必修

学时

总学时:32  理论学时:26  实验学时:6 其他学时:0

学分

2.0

开课学期

第二学期

开课单位

计算机科学与工程学院

适用专业

计算机科学与工程

授课语言

英文授课

先修课程

高级语言程序设计C++(一)

毕业要求(专业培养能力)

本课程对学生达到如下毕业要求有如下贡献:

1:(工程知识)培养学生熟练掌握英语,掌握扎实的计算机科学与技术专业基本原理、方法和手段等方面的基础知识用于解决复杂工程问题,并通过计算机系统分析、建模和计算等方面的先进方法,为将所学基础知识应用到计算机科学与技术研发和工程实践做好准备。

2:(问题分析)培养学生能够创造性地利用计算机科学基本原理解决计算机领域遇到的问题。

3:(设计/开发解决方案)能够设计针对计算机工程复杂问题的解决方案,设计满足特定需求的计算机软硬件系统,并能够在设计环节中体现创新意识,考虑社会、健康、安全、法律、文化以及环境等因素。

4:(研究) 培养学生具备计算机系统相关知识并对计算机工程复杂问题进行研究,具有计算机系统研发基本能力、具备问题分析和建模的能力,具有系统级的认知能力和实践能力,掌握自底向上和自顶向下的问题分析方法。

5:(使用现代工具)能够针对计算机工程复杂问题,开发、选择与使用恰当的技术、资源、现代工程工具和信息技术工具。

课程培养学生的能力(教学目标)

在顺利完成课程要求后,学生应该能够:

1)理解使用预处理程序包装以防止由于添加了在源代码文件头文件一个以上的副本而产生的多个定义错误

2)理解分别使用运算符newdelete来动态地创建和销毁对象

3)理解重新定义(过载)运算符来处理用户定义类的对象。

4)理解通过继承现有的类来创建类。

5)理解继承如何促进软件重用。

6)理解声明和使用虚拟函数以实现多态。

7)理解到使用C ++的面向对象的流输入/输出,来创建,读取,写入和更新文件。

8)理解什么是例外以及何时使用它们。

课程简介

这是一门编程入门课程,你将学习如何把面向对象的分析变为C++实现的基本步骤。本课程将介绍C ++编程的基本思路和计算学科的广度。我们将学习先进的功能,其中包括类,继承和多态,运算符重载等使用C ++编程的基本概念。使用C++编程的基本概念的先验知识是必需的。

教学内容与学时分配

9.

  • 主题:类:深入了解,避免抛出异常

  • 要点和教学的难点

  • 预处理包装

  • 类作用域和通过一个对象名,或一个指向对象的引用或指针访问类成员

  • 定义构造函数的默认参数,析构函数

  • const(常数)对象和const成员函数

  • 友元函数与友元类

  • this指针,newdelete运算符

  • 静态数据成员和成员函数.

  • 代理类

  • 异常概念

  • Try, catch throw

  • 未捕获和意外的异常.

  • 宣布新的异常类,处理新的故障

  • 堆栈展开可以使在一个作用域内没有被捕获的异常在其他作用域被捕获

  • auto_ptr

  • 标准的异常层次结构


  • 对学生的要求

  • 了解如何使用预处理程序包装以防止由于添加了在源代码文件头文件一个以上的副本而产生的多个定义错误

  • 了解什么是类作用域以及如何通过一个对象名,或一个指向对象的引用或指针访问类成员

  • 了解如何使用默认参数定义构造函数

  • 了解析构函数如何被用来在对象被销毁之前对对象执行“终止管家”.

  • 理解当一个类的公共成员函数返回私有数据的引用而可能发生的逻辑错误.

  • 理解如何指定const(常数)对象和const成员函数

  • 了解如何使用友元函数与友元类.

  • 了解如何使用this指针.

  • 了解如何分别使用运算符newdelete来动态地创建和销毁对象

  • 了解如何使用静态数据成员和成员函数.

  • 了解如何使用代理类来隐藏一个类客户的实现细节.

  • 了解什么是异常以及如何使用它们.

  • 了解如何使用trycatchthrow去分别检测、处理并注明异常

  • 了解如何处理未捕获和意外的异常

  • 了解如何声明新的异常类

  • 了解为何堆栈展开可以使在一个作用域内没有被捕获的异常在其他作用域被捕获

  • 了解如何处理新的故障

  • 了解如何使用auto_ptr以防止内存泄漏

  • 理解标准的异常层次结构

  • 学时:6

10

  • 主题:运算符重载;字符串和数组对象s

  • 要点和教学的难点

  • 重新定义(重载)运算符

  • 从一个类的对象转换到另一个类.

  • 创建电话号码,数组,字符串和日期类来说明操作符重载

  • USEE重载运算符和标准库类字符串的其他成员函数

  • 关键字显式

  • 对学生的要求

  • 了解如何重新定义(重载)运算符来处理用户定义的类的对象

  • 了解一元和二元重载运算符之间的差异

  • 了解如何将对象从一个类转换到另一个类.

  • 了解什么时候可以以及不可以重载运算符

  • 了解如何创建电话号码,数组,字符串和日期类来说明操作符重载

  • 了解如何使用重载运营商和标准库string类的其他成员函数

  • 了解如何使用关键字显式,以防止编译器使用单参数的构造函数进行隐式转换

  • 学时:4

11

  • 主题:面向对象编程:继承

  • 要点和教学的难点

  • 从现有的类继承创建类

  • 继承促进了软件重用.

  • 基类的概念和衍生类以及它们之间的关系

  • 在继承层次结构中构造函数和析构函数的使用

  • 使用继承来定制现有的软件

  • 对学生的要求

  • 了解如何通过从现有的类继承创建类.

  • 了解继承如何促进软件重用

  • 了解基类的概念和衍生类以及它们之间的关系

  • 了解在继承层次结构中构造函数和析构函数的使用

  • 了解如何使用继承来定制现有的软件

  • 学时:3

12

  • 主题:面向对象编程:多态

  • 要点和教学的难点

  • 多态,虚函数,抽象类

  • 运行时类型信息(RTTI),dynamic_casttype idTYPE_INFO

  • 虚析构函数

  • 对学生的要求

  • 了解什么是多态,它如何使编程更加方便,以及如何使系统更具可扩展性和可维护性

  • 了解如何声明和使用虚函数来实现多态

  • 了解如何声明纯虚函数来创建抽象类

  • 了解如何用downcastingdynamic_casttypeid运算和TYPE_INFO来使用运行时类型信息(RTTI

  • 了解C ++如何在底层实现虚函数和动态绑定

  • 了解如何使用虚析构函数,以确保所有适当的析构函数在对象上运行

  • 学分:3

13

  • 主题:流输入/输出

  • 要点和教学的难点

  • C ++的面向对象的流输入/输出,格式的输入和输出

  • I / O类层次结构,流操纵符

  • 控制理由和填充,确定输入/输出操作的成功或失败

  • 对学生的要求

  • 了解如何使用C ++的面向对象的流输入/输出

  • 了解如何格式化输入和输出

  • 了解流I / O类层次结构

  • 了解如何使用流操纵符

  • 了解如何控制调整和填充

  • 了解如何确定输入/输出操作的成功或失败

  • 了解如何将输出流绑定到输入流

  • 学时:6

14

  • 主题:文件处理

  • 要点和教学的难点

  • 创建,读取,写入和更新文件

  • 顺序文件处理

  • 随机存取文件处理

  • 高性能未格式化的I / O操作

  • 格式化的数据和原始数据文件的处理之间的差异

  • 使用随机存取文件处理建立事务处理程序

  • 对学生的要求

  • 了解如何创建,读取,写入和更新文件

  • 了解顺序文件的处理

  • 了解随机存取文件处理

  • 了解如何使用高性能的未格式化的I / O操作.

  • 了解格式化数据和原始数据文件的处理之间的差异

  • 了解如何建立使用随机存取文件处理的事务处理程序

  • 学时:4


实验教学(包括上机学时、实验学时、实践学时)

实验1:类和对象,运算符重载,学时:2;

实验2:继承和多态,学时:2;

实验3:文件处理,学时:2

教学方法

课程教学以课堂教学、课外作业、综合讨论等共同实施。

考核方式

本课程注重过程考核,成绩比例为:

  1. 平时作业表现:45%

  1. 考勤和课堂表现:15%

  2. 演讲 10%

  3. 作业 10%

  4. ACM上机考试10%

  1. 期末考试(闭卷):55%

教材及参考书

C++ How to Program, 9/ePaul DeitelHarvey DeitelISBN-10: 0133378713ISBN-13: 9780133378719Prentice Hall, 1080 pp, 02/12/2013

制定人及制定时间

徐雪妙,2019-04-04


Advanced Language Programming(C++) (2)” Syllabus

Course Code

045101991

Course Title

Advanced Language Programming(C++) (2)

Course Category

General Basic Course

Course Nature

Compulsory Course

Class Hours

Total hours: 32 theoretical hours: 26 experimental hours: 6 other hours: 0

Credits

2

Semester

2

Institute

The School of Computer Science and Engineering

Program Oriented

Computer Science and Engineering

Teaching Language

English

Prerequisites

Advanced Language Programming(C++) (1)

Student Outcomes

 (Special Training Ability)

1.Engineering Knowledge: An ability to apply knowledge of English, solid knowledge of professional basic principles, methods and means of computer science and technology for solving complex engineering problems, to well prepare the required knowledge applied to the computer science and technology research & development and engineering practice through computer systems analysis, modeling and calculation and any other aspects of the advanced approach.

2.Problem Analysis: An ability to creatively use the basic principles of computer science to solve the problems encountered in the computer field.

3.Design / Development Solutions: An ability to design solutions for computer engineering complex problems, to design computer hardware and software systems that meet with specific requirements, and to embody innovation awareness in the design process and take into account social, health, safety, cultural and environmental factors.

4.Research: An ability to develop computer system-related knowledge and research computer engineering complex issues, to develop the basic capacity of computer systems research & development, systematic cognitive and practice, master the Bottom-up and top-down problem analysis methods.

5.Applying Modern Tools: An ability to develop, select and use appropriate technologies, resources, modern engineering tools and information technology tools for complex computer engineering issues.

Teaching Objectives

Upon successful completion of the course requirements, a student should be able to:

  1. Understand to use a preprocessor wrapper to prevent multiple definition errors caused by including more than one copy of a header file in a source-code file.

  2. Understand to create and destroy objects dynamically with operators new and delete, respectively.

  3. Understand to redefine (overload) operators to work with objects of user-defined classes.

  4. Understand to create classes by inheriting from existing classes.

  5. Understand how inheritance promotes software reuse.

  6. Understand to declare and use virtual functions to effect polymorphism.

  7. Understand to use C++ object-oriented stream input/output. To create, read, write and update files.

  8. Understand what exceptions are and when to use them.

Course Description

This course is introductory programming course. You will learn the basic steps of turning an object-oriented analysis into a C++ implementation. This course will introduce the essential ideas of C++ programming and the breadth of discipline of computing. We will study advanced features which includes Classes, Inheritance and Polymorphism, Operator Overloading, etc. Prior knowledge of basic concepts of programming using C++ is required.

Teaching Content and Class Hours Distribution

Chapter 9.

  • Topic : Classes: A Deeper Look, Throwing Exceptions

  • Key points and the difficulty points of teaching

  • preprocessor wrapper  

  • class scope and accessing class members via the name of an object, a reference to an object or a pointer to an object.

  • define constructors with default arguments, destructors

  • const (constant) objects andconst member functions

  • friend functions and friend classes

  • this pointer, new and delete operators

  • static data members and member functions.

  • proxy classes  

  • exceptions concept

  • Try, catch and throw  

  • uncaught and unexpected exceptions.

  • declare new exception classes, handle new failures

  • stack unwinding enables exceptions not caught in one scope to be caught in another scope.

  • auto_ptr  

  • the standard exception hierarchy

  • Requirement for the students

  • Understand how to use a preprocessor wrapper to prevent multiple definition errors caused by including more than one copy of a header file in a source-code file.

  • Understand how to understand class scope and accessing class members via the name of an object, a reference to an object or a pointer to an object.

  • Understand how to define constructors with default arguments.

  • Understand how destructors are used to perform "termination housekeeping" on an object before it is destroyed.

  • Understand the logic errors that may occur when a public member function of a class returns a reference to private data.

  • Understand how to specify const (constant) objects and const member functions.

  • Understand how to use friend functions and friend classes.

  • Understand how to use this pointer.

  • Understand how to create and destroy objects dynamically with operators new and delete, respectively.

  • Understand how to use static data members and member functions.

  • Understand how to use proxy classes to hide implementation details from a class's clients.

  • Understand what exceptions are and when to use them.

  • Understand how to use TRy, catch and throw to detect, handle and indicate exceptions, respectively.

  • Understand how to process uncaught and unexpected exceptions.

  • Understand how to declare new exception classes.

  • Understand how stack unwinding enables exceptions not caught in one scope to be caught in another scope.

  • Understand how to handle new failures.

  • Understand how to use auto_ptr to prevent memory leaks.

  • Understand how to understand the standard exception hierarchy.

  • Credit hours: 6 hours

Chapter 10

  • Topic: Operator Overloading; String and Array Objects

  • Key points and the difficulty points of teaching

  • redefine (overload) operators  

  • convert objects from one class to another class.

  • create PhoneNumber, Array, String and Date classes that demonstrate operator overloading.

  • usee overloaded operators and other member functions of standard library class string.

  • keyword explicit  

  • Requirement for the students

  • Understand how to redefine (overload) operators to work with objects of user-defined classes.

  • The differences between overloading unary and binary operators.

  • Understand how to convert objects from one class to another class.

  • When to, and when not to, overload operators.

  • Understand how to create PhoneNumber, Array, String and Date classes that demonstrate operator overloading.

  • Understand how to use overloaded operators and other member functions of standard library class string.

  • Understand how to use keyword explicit to prevent the compiler from using single-argument constructors to perform implicit conversions.

  • Credit hours: 4 hours

Chapter 11

  • Topic: Object-Oriented Programming: Inheritance  

  • Key points and the difficulty points of teaching

  • create classes by inheriting from existing classes.

  • inheritance promotes software reuse.

  • the notions of base classes and derived classes and the relationships between them.

  • the use of constructors and destructors in inheritance hierarchies.

  • the use of inheritance to customize existing software.

  • Requirement for the students

  • Understand how to create classes by inheriting from existing classes.

  • Understand how inheritance promotes software reuse.

  • Understand the notions of base classes and derived classes and the relationships between them.

  • Understand the use of constructors and destructors in inheritance hierarchies.

  • Understand the use of inheritance to customize existing software.

  • Credit hours: 3 hours

Chapter 12

  • Topic: Object-Oriented Programming: Polymorphism

  • Key points and the difficulty points of teaching

  • polymorphism, virtual functions ,abstract classes

  • run-time type information (RTTI) , dynamic_cast, typeid and type_info.

  • virtual destructors  

  • requirement for the students

  • Understand what polymorphism is, how it makes programming more convenient, and how it makes systems more extensible and maintainable.

  • Understand how to declare and use virtual functions to effect polymorphism.

  • Understand how to declare pure virtual functions to create abstract classes.

  • How to use run-time type information (RTTI) with downcasting,dynamic_cast,typeid andtype_info.

  • How C++ implementsvirtual functions and dynamic binding "under the hood."

  • How to usevirtual destructors to ensure that all appropriate destructors run on an object.

  • credit hours: 3 hours

Chapter 13

  • Topic : Stream Input/Output

  • Key points and the difficulty points of teaching

  • C++ object-oriented stream input/output, format input and output

  • stream-I/O class hierarchy, stream manipulators.

  • control justification and padding, determine the success or failure of input/output operations.

  • Requirement for the students

  • Understand how to use C++ object-oriented stream input/output.

  • Understand how to format input and output.

  • Understand the stream-I/O class hierarchy.

  • Understand how to use stream manipulators.

  • Understand how to control justification and padding.

  • Understand how to determine the success or failure of input/output operations.

  • Understand how to tie output streams to input streams.

  • Credit hours: 6 hours

Chapter 14

  • Topic: File Processing

  • Key points and the difficulty points of teaching

  • create, read, write and update files

  • sequential file processing

  • random-access file processing

  • high-performance unformatted I/O operations

  • differences between formatted-data and raw-data file processing

  • build a transaction-processing program using random-access file processing

  • Requirement for the students

  • Understand how to create, read, write and update files.

  • Understand sequential file processing.

  • Understand the random-access file processing.

  • Understand how to use high-performance unformatted I/O operations.

  • Understand how to the differences between formatted-data and raw-data file processing.

  • Understand how to build a transaction-processing program using random-access file processing.

  • Credit hours:4 hours


Experimental Teaching

Credit hours: 6

Teaching Method

course teaching, homework, discussion etc. are jointly used in this course

Examination Method

This course emphasizes on evaluation of process, score composition ratios are as follow:

  1. Daily performance 45%

1Attendance + Q&A in the class 15%(in group)

2Presentation  10% (in group)

3Assignment (10%) (in person)

4ACM Examination10%(in person)

2. End-of-year examination (closed-book exam) 55%


Teaching Materials and Reference Books

C++ How to Program, 9/ePaul DeitelHarvey DeitelISBN-10: 0133378713ISBN-13: 9780133378719Prentice Hall, 1080 pp, 02/12/2013

Prepared by Whom and When

Xuemiao Xu2019-04-04


《高级语言程序设计C++(二)》实验教学大纲

课程代码

045101991

课程名称

高级语言程序设计C++(二)

英文名称

Advanced Language Programming(C++) (2)

课程类别

公共基础课

课程性质

必修

学时

总学时:32 实验学时:6

学分

2.0

开课学期

第二学期

开课单位

计算机科学与工程学院

适用专业

计算机科学与工程

授课语言

英文授课

先修课程

高级语言程序设计C++(一)

毕业要求(专业培养能力)

(本学院开设的专业课填写;根据专业所列的毕业要求来填写)

课程培养学生的能力(教学目标)

本课程对学生达到如下毕业要求有如下贡献:

1:(工程知识)培养学生熟练掌握英语,掌握扎实的计算机科学与技术专业基本原理、方法和手段等方面的基础知识用于解决复杂工程问题,并通过计算机系统分析、建模和计算等方面的先进方法,为将所学基础知识应用到计算机科学与技术研发和工程实践做好准备。

2:(问题分析)培养学生能够创造性地利用计算机科学基本原理解决计算机领域遇到的问题。

3:(设计/开发解决方案)能够设计针对计算机工程复杂问题的解决方案,设计满足特定需求的计算机软硬件系统,并能够在设计环节中体现创新意识,考虑社会、健康、安全、法律、文化以及环境等因素。

4:(研究) 培养学生具备计算机系统相关知识并对计算机工程复杂问题进行研究,具有计算机系统研发基本能力、具备问题分析和建模的能力,具有系统级的认知能力和实践能力,掌握自底向上和自顶向下的问题分析方法。

5:(使用现代工具)能够针对计算机工程复杂问题,开发、选择与使用恰当的技术、资源、现代工程工具和信息技术工具。

课程简介

这是一门编程入门课程,把面向对象的分析变为C++实现的基本步骤。本课程将介绍C ++编程的基本思路,学习先进的功能,其中包括类,继承和多态,运算符重载等使用C ++编程的重要概念。

主要仪器设备与软件

设备:电脑,软件:Visual Studio

实验报告

实验报告内容包括:

一、实验概述

实验目的:

实验要求:

实验环境

二、实验内容

实验步骤:

实验数据:

实验主要过程:

三、实验结论

考核方式

出勤率和课堂表现:20%

实验报告:80%

教材、实验指导书及教学参考书目

C++ How to Program, 9/ePaul DeitelHarvey DeitelISBN-10: 0133378713ISBN-13: 9780133378719Prentice Hall, 1080 pp, 02/12/2013

制定人及发布时间

徐雪妙,2019-04-04


《课程名称》实验教学内容与学时分配

实验项目编号

实验项目名称

实验学时

实验内容提要

实验类型

实验要求

每组人数

主要仪器设备与软件

1

类和对象,运算符重载

3

设计类和对象,编程实现使用了类、对象、运算符重载的程序。

综合性

必做

1

电脑,VC

2

继承和多态

3

基于继承和多态的思想,编写程序解决实际的应用问题。

综合性

必做

1

电脑,VC


Advanced Language Programming(C++) (2)” Experimental Syllabus

Course Code

045101991

Course Title

Advanced Language Programming(C++) (2)

Course Category

General Basic Course

Course Nature

Compulsory Course

Class Hours

Total32 credit hours; Experiment:6 credit hours

Credits

2

Semester

2

Institute

The School of Computer Science and Engineering

Program Oriented

Computer Science and Engineering

Teaching Language

English

Prerequisites

Advanced Language Programming(C++) (1)

Student Outcomes (Special Training Ability)

1.Engineering Knowledge: An ability to apply knowledge of English, solid knowledge of professional basic principles, methods and means of computer science and technology for solving complex engineering problems, to well prepare the required knowledge applied to the computer science and technology research & development and engineering practice through computer systems analysis, modeling and calculation and any other aspects of the advanced approach.

2.Problem Analysis: An ability to creatively use the basic principles of computer science to solve the problems encountered in the computer field.

3.Design / Development Solutions: An ability to design solutions for computer engineering complex problems, to design computer hardware and software systems that meet with specific requirements, and to embody innovation awareness in the design process and take into account social, health, safety, cultural and environmental factors.

4.Research: An ability to develop computer system-related knowledge and research computer engineering complex issues, to develop the basic capacity of computer systems research & development, systematic cognitive and practice, master the Bottom-up and top-down problem analysis methods.

5.Applying Modern Tools: An ability to develop, select and use appropriate technologies, resources, modern engineering tools and information technology tools for complex computer engineering issues.

Teaching Objectives

Upon successful completion of the course requirements, a student should be able to:

(1)Understand to use a preprocessor wrapper to prevent multiple definition errors caused by including more than one copy of a header file in a source-code file.

(2)Understand to create and destroy objects dynamically with operators new and delete, respectively.

(3)Understand to redefine (overload) operators to work with objects of user-defined classes.

(4)Understand to create classes by inheriting from existing classes.

(5)Understand how inheritance promotes software reuse.

(6)Understand to declare and use virtual functions to effect polymorphism.

(7)Understand to use C++ object-oriented stream input/output. To create, read, write and update files.

(8)Understand what exceptions are and when to use them.

Course Description

This course is introductory programming course. You will learn the basic steps of turning an object-oriented analysis into a C++ implementation. This course will introduce the essential ideas of C++ programming and the breadth of discipline of computing. We will study advanced features which includes Classes, Inheritance and Polymorphism, Operator Overloading, etc. Prior knowledge of basic concepts of programming using C++ is required.

Instruments and Equipments

PC and Microsoft Visual Studio

Experiment Report

1. Description

Objective

Requirement

Running Environment:


2. Content

1). Step

2). Data

3). Major Procedure


3. Conclusion

Assessment

This course emphasizes on evaluation of process, score composition ratios are as follow:

Homework and classroom performance: 20%

Experimental report: 80%

Teaching Materials and Reference Books

C++ How to Program, 9/ePaul DeitelHarvey DeitelISBN-10: 0133378713ISBN-13: 9780133378719Prentice Hall, 1080 pp, 02/12/2013

Prepared by Whom and When

Xuemiao Xu2019-04-04


 “CourseTitle” Experimental Teaching Arrangements

No.

Experiment Item

Class Hours

Content Summary

Category

Requirements

Number of StudentsEach Group

Instruments, Equipments and Software

1

Class and object, Operator overloading

3

Design class,

Create object,

Implement the operator overloading

Comprehensive

Compulsory

1

PC, VC

2

Inheritance and Polymorphism

3

Design and implement the program using the class inheritance and polymorphism


Comprehensive

Compulsory

1

PC, VC