Southampton University DACE

Introduction to Programming

JC154

Overview of Sessions

Tutor : David Millard (dem@soton.ac.uk)


This course is intended to introduce computer programming to those who have little or no previous experience.

The teacher this semester is David Millard

The course is assessed as follows:

Also the following courseworks have now been set:

  1. Coursework1
  2. Coursework2
  3. Coursework3

I have compiled a list of resources that are available for you to use. Of particular interest will be the free compilers and online help. Follow the link below to find them:

Resources

The course is designed in 12 sessions as follows (N.B. I'm currently putting the notes onto the web, so more and more should become available!):

1) Introduction

  • make sure that everyone is registered to use the computers or can use them for the evening.
  • use the Web browser called Netscape to find some course notes on the C programming language.
  • use the Borland C compiler on the system to compile and run a simple C program.
  • 2) Basics, using input output

  • use the Web browser called Netscape to find some example programs on the World Wide Web.
  • use the Borland compiler on the system to compile and run some simple C programs
  • explore the use of printf and scanf. This will involve building confidence and skills with the programming environment provided.
  • 3) Control Structures - Choices

  • examine how arithmetic can be done in C
  • discover problems which arise when care is not taken with the correct use of types
  • introduce choice into our C programs by the use of if - else
  • 4) Control Structures - Loops

  • try a couple of further examples of making decisions in C programs
  • examine the sources of errors in the use of if - else
  • try an example of the case statement
  • try a loop structure in C
  • 5) An Example Program

  • learn to use the C function called ‘random’
  • use it in a program to set arithmetic problems for children
  • 6) Functions

  • subdividing problems and thus making them easier to solve
  • giving the ability to re-use a good section of code you have written
  • Worksheet


    7) Pointers

    8) Arrays

  • check that we are confident about pointers
  • use an array to store many numbers and sort them into order
  • search an array for a number using a binary search algorithm
  • 9) Strings

  • consolidate our understanding of the use of arrays from last week
  • begin work on strings in preparation for the final coursework
  • 10) Dynamic Memory Allocation

  • consolidate our understanding of the use of strings
  • explore the notion of dynamic memory allocation
  • 11) Advanced Topics

  • recursion
  • structs
  • bitwise operations
  • 12) Data Structures

    Additional Work

    Through the sessions in this course we have covered a large portion of the C language, in particular concentrating on those aspects that are relevant to other procedural languages (i.e. control structures, functions, memory management). However there are other things in the language that are worth spending some time on. The following sessions are ones that we will not actually do in the course but are still worth you looking at in your own time.

    Extra 1) Files

  • explore the use of text files in C
  • see how we can use text files as input for commercial programs