CPSC 1012
Welcome to Programming Fundamentals!
The following links are an overview of the entire course:
- Glossary: important terms used in CPSC 1012
- Cheatsheet: speed-run of the entire course!
- Coding Standards: some best practices for organizing and writing your code
Topics
If you want to dig into a specific topic further, check out these pages:
- Decision Structures
if
statementsswitch
statements
- Formatting
- adjusting precision of numbers
- formatting currency
- formatting as columns
- adding colour
- Loops
- operator shorthand (
i++
) while
for
do while
- operator shorthand (
- 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
- Open up a Command Prompt.
- Use the
cd
command to navigate to the location of the.cs
file. - 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 typingMyFile.exe
.
Code Samples from class
Looking for the examples we did live in class? These are available in my other repo.