CPSC 1012

Welcome to Programming Fundamentals!

The following links are an overview of the entire course:


Topics

If you want to dig into a specific topic further, check out these pages:

  • Decision Structures
    • if statements
    • switch statements
  • Formatting
    • adjusting precision of numbers
    • formatting currency
    • formatting as columns
    • adding colour
  • Loops
    • operator shorthand (i++)
    • while
    • for
    • do while
  • File i/o
    • how to read from and write to an external file
  • Exceptions
    • how to deal with unexpected situations
  • Methods
    • the building blocks of our program
  • Collections
  • Objects & Classes
    • how to define your own class
    • how to construct an object
  • Testing
    • Bonus content!

Miscellanea

To compile & run a C# program w/o Visual Studio

  1. Open up a Command Prompt.
  2. Use the cd command to navigate to the location of the .cs file.
  3. Run the command csc MyFile.cs (where MyFile.cs is the name of your .cs file) to compile the file. This will create an executable file called MyFile.exe, which we can run by typing MyFile.exe.

Code Samples from class

Looking for the examples we did live in class? These are available in my other repo.