Instructor: Adam Dingle
Programming 2 will build on our knowledge from Programming 1 and Introduction to Algorithms. The course has several goals:
We will learn the C# language and expand our knowledge of object-oriented programming. We’ll study features shared by C# and other modern languages, such as static typing, classes, inheritance, interfaces, generics and exceptions. We will also study the C# collection class hierarchy and will learn to build our own collection classes. (We will not attempt to cover every feature of C# or go deeply into its class library. For that, you can take NPRG035 Programming in C# Language, offered in the winter term.)
We’ll study various algorithms and programming techniques including combinatorial recursion, dynamic programming and game-playing algorithms.
We’ll learn about event-driven programming and graphical interfaces, and will discuss how to build larger programs using object-oriented design.
If time permits, we may also discuss other topics such as regular expressions, recursive-descent parsing, multithreaded programming, network programming, and/or writing interpreters.
The weekly lecture takes place every Monday from 10:40 – 12:10 in room N1 in the Impakt building in Troja.
There are three tutorial sessions:
every Monday from 14:00 – 15:30 in room N11 (teacher: Tomáš Bílý)
every Tuesday from 10:40 – 12:10 in room N10 (teacher: Vít Šefl)
every Tuesday from 12:20 – 13:50 in room N11 (teacher: Vít Šefl)
Aryan Kumar will teach a mentoring session every Wednesday from 15:40 - 17:10 in room N6.
Adam Dingle will hold office hours every Friday from 14:00 - 15:00 in room S10.
To successfully complete this class, you must:
Complete a number of programming exercises through the semester, which your tutorial teacher will assign weekly. You can submit your solutions to ReCodEx. You will need to earn at least 70% of the possible points for these exercises.
Write a program in C# as a semester project. Your program should accomplish something that is interesting, and should be more substantial than your semester project for Programming 1. It should be written in an object-oriented way, making good use of classes and other features we have learned in this course. A typical project for Programming 2 might be 300-500 lines long. Here are some project ideas. Please send your tutorial teacher a project proposal by Sunday, May 4th. A first working version of your project is due by Sunday, June 9th. A final version of your project is due by Sunday, June 15th.
Take an exam at the end of the semester. In the exam you'll need to write several programs in C#. You may attempt the exam up to three times during the exam period (May 26 - June 30). I will not offer the exam again after June 30th.
Regularly attend the lectures and tutorials.
You may not use GPT, Copilot or other AI tools to generate code that you submit in any homework assignment or semester project in this course. Any use of such tools is considered cheating and may disqualify you from passing the class.
Joseph Albahari, C# 12 in a Nutshell (O'Reilly, 2023) (also at ebooks.com)
Michaelis and Lippert, Essential C# 12.0 (Addison-Wesley, 2023)
Cormen et al, Introduction to Algorithms, Fourth Edition (MIT Press, 2022)
C# Language Reference (Microsoft)
.NET API Reference (Microsoft)
This is a rough plan for this class; it will probably evolve as the semester goes on.