CSC 203 Project-based Object-oriented Programming and Design
As taught in Winter 2024. If you’re a current student in this course, please refer to our course Canvas, not to this page.
Contents
Acknowledgement
I inherited a version of this course in 2020, and bits and pieces have changed over the years. But the core content is as it was, so I am grateful to Julie Workman, Paul Hatalsky, Zoë Wood, and Aaron Keen for their efforts in creating this course.
Syllabus
Welcome!
Course info and important links
- Instructor: Ayaan M. Kazerouni
- Email: ayaank@calpoly.edu
- Office hours: See my website
- CSSE tutoring lab: Your fellow students offer free tutoring for various introductory CS courses, including CPE/CSC 203.
- EdStem forum (you will need to join using this invite link before you can access the forum)
- Course schedule (Check this frequently!)
Course overview
Object-oriented programming and design with applications to project construction. Introduction to class design, interfaces, inheritance, generics, exceptions, streams, and testing. 3 lectures, 1 laboratory. Prerequisite: CPE/CSC 202 with a grade of C– or better or consent of instructor.
Course objectives
By the end of the quarter, students will be able to:
- Explain key object‐oriented concepts including: classes, objects, methods, instantiation, invocation, interaction between objects, composition, encapsulation, and use of class libraries.
- Use object‐oriented concepts and design to implement moderately sophisticated “large” programs.
- Describe the philosophy and mechanics of interfaces including abstraction and specification independence of specification and implementation, contractual requirements in interface implementation, subtypes and type casting, polymorphism, interface hierarchies, and implementation of multiple interfaces.
- Define interfaces in programs to support abstractions according to the principles of interface segregation and dependency inversion where design weaknesses are identified.
- Create a unit test plan for a set of methods in a class.
- Implement program pieces (classes and methods) that use generic types.
- Discuss the differences among generics, sub-typing, and overloading.
- Describe the philosophy and mechanics of inheritance including generalization, specialization via extension, difference between extension and composition, subtypes and type casting, polymorphism, and inheritance hierarchies.
- Use inheritance in the implementation of program components such as in the application of a refactoring process to an existing software implementation to improve some aspect of its design.
- Explain the relationship between object‐oriented inheritance (code‐sharing and overriding) and sub-typing.
- Articulate design principles including separation of concerns, information hiding, coupling and cohesion, and encapsulation.
- Apply class design principles to the development of a design document for a moderately sophisticated “large” program.
Here are (some of the) Computer Science and University learning objectives
- Ability to apply knowledge of computing and mathematics
- Ability to analyze a problem and identify and define the computing requirements appropriate for its solution
- An ability to communicate effectively with a range of audiences
- An ability to use current techniques, skills, and tools necessary for computing practice
- Recognition of the need for, and an ability to engage in continuing professional development
Policies and advice
Class communication and getting help
We will use EdStem as the class Q&A forum. Get yourself added to it using the invite link.
I’m teaching two sections of this class this quarter—one at 2:10pm and one at 4:10pm. Both sections will use the same EdStem forum. Please include your section time in your display name. For example, if I were a student in the earlier section, I would write Ayaan Kazerouni (2pm) as my display name.
Please ask all course-related questions on EdStem, unless you are sending me documents or files of some kind, or asking for things like meeting appointments.
Some benefits of using EdStem are:
- You can answer each other’s questions or participate in discussions.
- The forum will be a searchable index of questions. This can save you a ton of time when you’re working on something and need a question answered. It will also help me avoid answering the same question multiple times.
- You can post questions anonymously.
You’re also welcome to stop by my office whenever you have questions, or just to chat about the course. I encourage it! Try problems yourself before coming to me—you will learn a lot from trying and re-trying with alternate strategies—but don’t stay stuck for too long. While I won’t sit and debug your code with you, I can give help and hints for where to look. If you can’t make office hours, contact me and we can schedule an appointment for another time.
Attendance policy
There is no explicit attendance policy for this class. However,
- There will occasionally be graded activities in class that you must be present to complete.
- There is no textbook that we’ll follow, nor are there usually slides. I’ll upload code examples I discuss in class, but studying from them will be difficult without the surrounding context you would receive by attending class.
- My teaching is interactive; I rely on input from students to drive class sessions, particularly while live-coding. If you’re not present, you’re relying on other students asking the questions you might want to ask.
Anything I say in class is fair game for quizzes (within reason and unless specified otherwise).
All this adds up to: I strongly recommend that you attend every class session!
If you’re unable to attend class for some reason, drop me a note to let me know. This way if there’s an activity that class period, I can give you an opportunity to make it up.
Assignments
Frequency | Portion of the final grade |
---|---|
6–8 lab exercises | 20% (2-3% each) |
4 projects | 40% (10% each) |
6–7 quizzes | 15% (3–4% each) |
1 final exam | 15% |
Participation | 10% |
Total | 100% |
Please see each program description for grading/rubric details. I won’t curve grades, aside from a few very specific cases. Please don’t ask me if I’ll curve your grade at the end of the quarter.
- Source code for all programming assignments will use the most recent Java version.
- For all labs and projects, we will use IntelliJ IDEA as the editor, and GitHub classroom for downloading starter files and submitting solutions.
- Please create a GitHub account by the first day of class. If your GitHub username does not include your name, please add your name to your profile—I’ll need to know to whom each account belongs.
Lab and lab exercises
Regular and frequent labs will be assigned and collected each week and together will comprise 20% of your course grade. The three hours of scheduled lab time each week is the primary time your instructor will be available for questions and assistance—make wise use of this resource! You are expected to work on the lab exercises during your scheduled lab time plus as much additional time as necessary to complete them. You ARE allowed to discuss labs with classmates, but you must turn in your own work.
The lab exercises are designed to familiarise you with some of the concepts necessary to complete your projects and to help you do well on quizzes. You may work on your projects in lab after completing all currently assigned labs.
Late policy
Labs may be turned in 1 day late for up to 70% credit. It’s your responsibility to make sure the staff know when you are doing this—without prior communication, we will not know to look for late lab submissions.
Labs will be graded against test cases, in-lab demos, or both.
Projects
There will be 4 programming assignments throughout the quarter. The last three will build upon each other. They will require analysis, design, implementation, testing, and documentation.
Late policy
For ONE of the first 3 programming projects (not labs and not project 4), you may have up to a 3-day extension, no questions asked. You must let the instructor know you wish to use this extension before the project deadline.
The reason this is given is because I recognise life as a college student is often stressful and I don’t know all of the situations you each are going through—your mental and physical health is a priority. In addition, if the policy was “no late work”, some students may feel more entitled to ask for extensions in an emergency than others—the extension is meant to be an equaliser.
A couple of things to note regarding this extension:
- Do not lose track of when you use this—you only get one extension, non-negotiable.
- Projects build upon each other—you do not want to use your extension unless absolutely necessary. The class is intentionally paced—if you use this policy as a procrastination tool, your work will pile up. You will have to wait longer to get your grade when you use it.
Quizzes
We’ll have weekly quizzes, taken on Fridays at the start of lab. You must be present in class to take the quiz. If you are not present in class, your score for that quiz is automatically a 0.
If you have an unavoidable reason why you cannot make it to class on a quiz day, please talk to me about it. If you miss class for some unforeseeable reason or emergency, please talk to me as and when you are able to after a quiz. I’m usually willing to do make-up quizzes if they are missed for legitimate reasons.
Quizzes will be cumulative since programming knowledge tends to build on itself. But they will mostly focus on material from the previous week.
Quizzes will be open-note. This means you can use your notes or material that I have provided to help you take the quiz. However, you cannot use other resources like Google, StackOverflow, or large language models to help you take the quizzes.
The purpose of each quiz is for me and you to assess your understanding. I won’t ask questions that require you to memorise obscure facts, and on the rare occasions I ask you to write code in a quiz, I will be lenient for things like syntax issues.
Quizzes will have time limits. These will be somewhat tight time limits. This means you cannot rely purely on the open notes to take the quiz.
Final exam
There will be a written final exam during finals week. The exam will be have questions similar to what you have seen on the quizzes, so studying the quizzes is a good way to study for the final.
The time and place for the final exam are still being decided, since it will be a common final exam taken at the same time by all sections of CSC 203.
This means that our course will NOT use the Registrar-allocated final exam time for our lecture time. We have requested a common final exam slot and will be allocated one by the Registrar in the coming weeks. I will update the schedule and make an announcement when the time is finalised.
Honesty
Although I encourage you to have lively discussions with one another, all work you hand in must be your own work, unless otherwise specified. Programs will be compared using software that can reliably detect similarities in source code.
Though you are encouraged to seek help in tutoring and from the TA and instructor, do not look at classmates’ code or show your code to classmates. Unless explicitly allowed to do so, do not discuss specific implementation of your code. If your program or parts of your program are plagiarized from another student or an unapproved source, you will face severe penalties, to the possible extent of failing the course and having a letter put in your file with Cal Poly Judicial Affairs.
This includes students who copied and students who were copied from—you are responsible for the privacy of your source code.
Use of large-language models like ChatGPT
Large-language models (LLMs) and similar tools have the potential to radically change the way in humans work. I understand the value-added in using ChatGPT and its ilk to help learn and study. But these tools should be used carefully, and never in a way that undermines the spirit of expending genuine mental energy to understand material and to complete programming assignments.
I have used it myself for quick routine tasks — however, I need to correct its output frequently, often in subtle but impactful ways. It can be challenging for newcomers to a programming language (such as, I expect, yourselves) to tell when ChatGPT’s output requires modifications or wholesale revisions. As such, I am imposing the following rules with respect to its usage in CSC 203 (I say “ChatGPT” below, but these rules apply to any similar ML-based tools):
- You MAY use it to help study and understand material from class.
- You MAY use it on lab assignments, provided that you provide the prompt you used in a comment and are honest about your usage of it.
- You MAY NOT use ChatGPT during quizzes or the final exam.
- You MAY NOT submit any code generated by ChatGPT for programming projects.
- Because you may not submit any ChatGPT-generated code in project submissions, it is specifically not acceptable to say that you submitted the same code as another student because it was generated by ChatGPT. Duplicate submissions, even those due to identical outputs of ChatGPT, will be considered academic integrity violations, and subject to the treatments above.
Diversity and Inclusion
Our classroom and lab are to be places of learning and inclusion. Students of all ages, abilities, background, race, sexual orientations, beliefs, religious affiliations, gender identities, and origins are to be treated with dignity and respect as contributors to our scholarly environment.
- We are not code snobs. We do not assume knowledge or imply there are things that somebody should know.
- After our work is complete, we prioritise the education of others and actively offer to help, explain, debug, etc. in order to support one another’s learning. We do not share our working solution, but explain the logic/thinking behind our solution and help others recognise errors in their implementation when invited to do so.
- We consistently make the effort to actively recognise and validate multiple types of contributions to a positive classroom environment.
Course schedule
Here’s the topic breakdown for the course. These are unpolished course-notes, partly written as guides for myself. Many of the code examples in these notes originated from Julie Workman, Paul Hatalsky, Aaron Keen, and Zoë Wood.
Lab and project specs will be released in Canvas.
# | TOPIC AND NOTES | ASSIGNMENT DUE |
---|---|---|
1. | Introduction | |
2. | Data types, arithmetic, type-casting | Lab 0 (Intro to Java) |
3. | Classes, objects, lists, maps | Lab 1 (Loops and lists) |
4. | Procedural and object-oriented programs | |
5. | Method dispatch (overloading and overriding) | Lab 2 (Instance and static methods) |
6. | A class design process | |
7. | Interfaces (part 1) | |
8. | Interfaces (part 2) | Lab 3 (Interfaces) |
9. | Interfaces (part 3) | |
10. | Abstract classes | |
11. | Inheritance and equality | |
12. | Hashcode | Lab 4 (Inheritance, equality, and hashcode) |
13. | Comparables and comparators | |
14. | Comparators, lambdas, and method references | |
15. | Lambdas and functional interfaces | |
16. | Streams | Lab 5 (Comparators, lambdas, and streams) |
17. | Binary trees (OpenDSA Chapter ⇗) | |
18. | Graph traversals — Depth-first search and breadth-first search (OpenDSA Chapter ⇗) | Lab 6 (Depth-first search) |
19. | A-star search | |
20. | Exceptions and exception handling | Lab 7 (Exception handling) |