课程概述

《程序设计基础》课程以计算思维构建为主线,把相关基础知识、编程技术和程序设计思想融会贯通,并将软件工程的开发方法融入到课程教学内容之中。课程采用英文课件PPT及中文视频讲解的方式,将中英文教学资源相结合,包括每周的测验题目均为中英文对照题目,培养学生的国际视野和自学能力。课程教学内容包括数据类型、控制结构、文件访问与数组等核心编程概念以及模块化问题分析、程序设计、程序文档编写、代码风格等程序设计技术。通过对程序设计流程、基本控制结构、搜索与排序算法、文件操作及基本编程设计工具的学习,提高学生解决实际问题的能力,为计算机相关专业后续核心课程的学习打下坚实的基础。

证书要求

平时作业10%

平时测验10%

课程实验30%

期末考试50%

授课大纲

Chapter 1. Introduction to Computers

简单介绍课程的背景,包括什么是计算机硬件软件,计算机如何存储数据以及一个程序如何工作等。

课时

  • 1.1 Introduction
  • ,
  • 1.2 Hardware and Software
  • ,
  • 1.3 How Computers Store Data
  • ,
  • 1.4 How a Program Works
  • ,
  • 1.5 Types of Software


Chapter 2. Introduction to C Programming

以示例程序讲解的形式切入对C语言程序基本结构与构成元素的介绍,并解释内存在编程中的重要作用。

课时

  • 2.1 A Simple C Program: Printing a Line of Text
  • ,
  • 2.2 Another Simple C Program: Adding Two Integers
  • ,
  • 2.3 Memory Concepts
  • ,
  • 2.4 Arithmetic in C


Chapter 3. C Program Selection Structure

介绍算法的概念,并引出对控制结构的介绍以及C语言中if和if..else语句的使用方式。

课时

  • 3.1 Algorithms
  • ,
  • 3.2 Control Structures
  • ,
  • 3.3 The if Statement
  • ,
  • 3.4 The if…else Statement
  • ,
  • 3.5 Case Study


Chapter 4. C Program Repetition Structure

讲解另一种常用控制结构,循环。分别讲解C语言中的while循环和for循环的使用方法,以及循环与选择结构的综合使用。

课时

  • 4.1 Introduction
  • ,
  • 4.2 Iteration Essentials
  • ,
  • 4.3 The while Statement
  • ,
  • 4.4 Counter-Controlled Iteration
  • ,
  • 4.5 for Iteration Statement
  • ,
  • 4.6 Examples Using the for Statement
  • ,
  • 4.7 switch Multiple-Selection Statement
  • ,
  • 4.8 do…while Iteration Statement
  • ,
  • 4.9 break and continue Statement
  • ,
  • 4.10 Structured Programming Summary


Chapter 5. C Functions

介绍模块化编程的概念,引出C语言中函数的定义及构成,讲解编写与调用C语言函数的具体语法。

课时

  • 5.1 Introduction
  • ,
  • 5.2 Modularizing Programs in C
  • ,
  • 5.3 Math Library Functions
  • ,
  • 5.4 Functions
  • ,
  • 5.5 Function Definitions
  • ,
  • 5.6 Function Prototypes: A Deeper Look
  • ,
  • 5.7 Headers
  • ,
  • 5.8 Passing Arguments By Value and By Reference
  • ,
  • 5.9 Random Number Generation
  • ,
  • 5.10 Example: A Game of Chance; Introducing enum
  • ,
  • 5.11 Storage Classes
  • ,
  • 5.12 Scope Rules
  • ,
  • 5.13 Recursion
  • ,
  • 5.14 Example Using Recursion: Fibonacci Series


Chapter 6. C Arrays and Strings

讲解数组的基本概念以及如何定义和使用数组,并举例说明如何使用字符数组存储多个字符串,以及字符串和字符串数组的定义与使用。

课时

  • 6.1 Introduction
  • ,
  • 6.2 Arrays
  • ,
  • 6.3 Defining Arrays
  • ,
  • 6.4 Array Examples
  • ,
  • 6.5 Using Character Arrays to Store and Manipulate Strings
  • ,
  • 6.6 Static Local Arrays and Automatic Local Arrays
  • ,
  • 6.7 Multidimensional Arrays
  • ,
  • 6.8 Fundamentals of Strings and Characters
  • ,
  • 6.9 Character-Handling Library
  • ,
  • 6.10 String-Conversion Functions
  • ,
  • 6.11 Standard Input/Output Library Functions


Chapter 7. C Structures

介绍为什么需要结构体以及C语言中结构体的定义、初始化、结构体成员访问以及在函数中如何使用结构体。

课时

  • 7.1 Introduction
  • ,
  • 7.2 Structure Definitions
  • ,
  • 7.3 Initializing Structures
  • ,
  • 7.4 Accessing Structure Members
  • ,
  • 7.5 Using Structures with Functions
  • ,
  • 7.6 typedef
  • ,
  • 7.7 Example: High-Performance Card Shuffling and Dealing Simulation
  • ,
  • 7.8 Unions
  • ,
  • 7.9 Enumeration Constants


Chapter 8. C Pointers

讲解指针的基本概念以及物理含义,介绍指针变量的定义、初始化及使用方法。结合指针在函数中的使用,讲解值传递与地址传递的区别与联系。

课时

  • 8.1 Introduction
  • ,
  • 8.2 Pointer Variable Definitions and Initialization
  • ,
  • 8.3 Pointer Operators
  • ,
  • 8.4 Passing Arguments to Functions by Reference
  • ,
  • 8.5 Bubble Sort Using Pass-by-Reference
  • ,
  • 8.6 sizeof Operator
  • ,
  • 8.7 Pointer Expressions and Pointer Arithmetic
  • ,
  • 8.8 Relationship between Pointers and Arrays
  • ,
  • 8.9 Arrays of Pointers
  • ,
  • 8.10 Pointers to Functions
  • ,
  • 8.11 Accessing Structure Members


Chapter 9. C Linked Lists

分析动态内存分配的需求以及基本原理,解释链表的概念。

课时

  • 9.1 Introduction
  • ,
  • 9.2 Self-Referential Structures
  • ,
  • 9.3 Dynamic Memory Allocation
  • ,
  • 9.4 Linked Lists


Chapter 10. C File Processing

介绍文件的基本概念和类型,讲解C语言中对于文件操作的相关函数和实现方式。

课时

  • 10.1 Introduction
  • ,
  • 10.2 Files and Stream
  • ,
  • 10.3 Creating a Sequential-Access File
  • ,
  • 10.4 Reading Data from a Sequential-Access File
  • ,
  • 10.5 Random-Access Files
  • ,
  • 10.6 Creating a Random-Access File
  • ,
  • 10.7 Writing Data Randomly to a Random-Access File
  • ,
  • 10.8 Reading Data from a Random-Access File
  • ,
  • 10.9 Case Study: Transaction-Processing Program

参考资料

教材:C How to Program(8th Edition )Paul J. Deitel, Harvey Deitel著, Pearson出版社,2015

参考书:

1.   C语言大学教程》(第八版),Paul   J. Deitel, Harvey Deitel著,苏小红等译,北京:电子工业出版社,2017年;

2.    Problem Solving & Program   Design in C(8th Edition )》,   Jeri R. Hanly& Elliot B. Koffman著,Pearson出版社,2015年;

3.    Starting out with Programming Logic   and Design(5th Edition )》,Tony   Gaddis著,Pearson出版社,2018年;

4.   RAPTOR流程图+算法程序设计教程》,冉娟、吴艳、张宁著,北京:北京邮电大学出版社2016年;

5.   标准C程序设计(7) E. Balagurusamy李周芳译,北京:清华大学出版社2017年。