From d43833ed57392efb14dc18f006ee3bd4c6481494 Mon Sep 17 00:00:00 2001 From: Mehrdad Shirvani Date: Fri, 7 Nov 2025 18:48:00 +0330 Subject: [PATCH] feat: add content --- src/content/00-course-info/course-guide.md | 54 +++++++ .../01-problem-solving/0-Overview.md | 39 +++-- .../01-problem-solving/1-Workshop.md | 13 +- .../01-problem-solving/2-Assignment.md | 12 +- .../01-topics/01-problem-solving/3-Q&A.md | 28 ---- .../02-basics-and-data-types/0-Overview.md | 83 +++++++++- .../02-basics-and-data-types/2-Assignment.md | 10 ++ .../02-extras/shortcuts/vs code shortcuts.md | 0 src/content/README.md | 3 - src/content/index.md | 146 ++++++++++++++++++ 10 files changed, 317 insertions(+), 71 deletions(-) create mode 100644 src/content/02-extras/shortcuts/vs code shortcuts.md delete mode 100644 src/content/README.md create mode 100644 src/content/index.md diff --git a/src/content/00-course-info/course-guide.md b/src/content/00-course-info/course-guide.md index e69de29..1b774cf 100644 --- a/src/content/00-course-info/course-guide.md +++ b/src/content/00-course-info/course-guide.md @@ -0,0 +1,54 @@ +# Syllabus + +# **Course Objectives** + +## Short Description + +## Key Elements + +## Upon successful completion of this course, the student will be able to: +## Final Project + + +## **Assignments** + + + +## **Final Exam** + + +## **Attendance and Participation** + + +**Attendance is required**, and exceeding four absences may result in a penalty of up to 2 points off your total grade. Active participation in both in-class activities and the online message board is highly encouraged. + +# **Grading** + +- + +## **Seeking Assistance** + +Here are the available help resources, organized by the urgency of your issue: + +### **Messaging** + +Our course will utilize a Telegram group (link to be provided in class) as the primary communication platform for announcements and discussions. This is an ideal space for asking questions that can be answered by anyone. It’s best to use this resource for non-urgent inquiries. + +### **Talk with the Instructor** + +For any issues at all, please reach out to the instructor: + +- Speak with me before class +- Raise your hand or speak up during class + +## **Required Tools and Accounts** + +## **Collaboration Policy** + +### **📜 [View Generative AI Usage Guidelines](https://dbcs.ir/AI_Guidelines/)↵** + +## **Related Courses** + +### Other courses + +## **A note on self care.** diff --git a/src/content/01-topics/01-problem-solving/0-Overview.md b/src/content/01-topics/01-problem-solving/0-Overview.md index 2fe1f71..3e7ce04 100644 --- a/src/content/01-topics/01-problem-solving/0-Overview.md +++ b/src/content/01-topics/01-problem-solving/0-Overview.md @@ -1,46 +1,43 @@ -# 🧭 Topic: Basics of C++ & Data Types +# 🧭 Topic: Problem Solving > [!info] Quick Overview -> This topic introduces how to compile and run C++ code, basic input/output, variables, built-in data types, and the math library. -> By the end, students will be able to write simple C++ programs using variables and standard input/output streams. - +> This foundational topic introduces the core skill of programming: problem-solving. It's not about writing code immediately, but about learning how to think logically and systematically. We will explore how to break down complex problems into smaller, manageable steps using a structured approach. By the end of this lecture, students will understand the principles of algorithmic thinking and be able to plan solutions using tools like flowcharts and pseudocode before writing a single line of code. --- ## 📌 Covered in This Topic -- Introduction to compilation and code editors -- `cin` / `cout` basic usage -- Variables and naming conventions -- Built-in data types (`int`, `float`, `double`, `char`, `bool`) -- Type conversion -- Using the math library - +- **The Art of Problem Solving:** An introduction to planning, creativity, innovation, and clearly defining the cause, goal, and potential solutions to a problem. +*   **Stages of Algorithmic Thinking:** A 7-step logical process for solving problems: +    1.  Define the Problem +    2.  Analyze and Understand +    3.  Identify Potential Solutions +    4.  Evaluate and Choose a Solution +    5.  Plan Actions +    6.  Implement the Code +    7.  Review the Results +*   **What is an Algorithm?** Defining an algorithm as a step-by-step procedure or a recipe for solving a problem. +*   **Introduction to Flowcharts:** Learning to visualize the flow of a solution using standard symbols to represent actions, decisions, and data flow. +*   **Introduction to Pseudocode:** Understanding how to write a plain-language, structured description of an algorithm's steps before translating it into a programming language. +*   **Choosing the Best Algorithm:** An introduction to the criteria for evaluating different solutions, focusing on time and space efficiency, reliability, and simplicity. --- ## 📑 Slides & Materials -- 👨‍🏫 [Professor Slides (PDF)](./slides/prof.pdf) - 🧑‍🏫 [TA Workshop Slides (PDF)](./slides/ta.pdf) --- ## 🛠️ Workshop & Assignments - 💬 [Workshop Questions](./workshops) -- 🧮 [Assignments](01-topics/01-problem-solving/1-Workshop.md) -- ❓ [Q&A and Common Issues](./resources/qa.md) +- 🧮 [Assignments](2-Assignment.md) + --- ## 🌐 Additional Resources -- [C++ Reference](https://cplusplus.com/reference/) -- [Learn C++](https://www.learncpp.com/) -- [Data Types in C++ (W3Schools)](https://www.w3schools.com/cpp/cpp_data_types.asp) - -_Add more useful links here as the course progresses._ --- ## ⏩ Navigation -- ⬅️ [Previous Topic: Problem Solving](../02-problem-solving/topic.md) -- ➡️ [Next Topic: Conditions & Loops](../04-conditions-loops/topic.md) +- ➡️ [Next Topic: Basics of C++ & Data Types](../02-basics-and-data-types/0-Overview.md) --- diff --git a/src/content/01-topics/01-problem-solving/1-Workshop.md b/src/content/01-topics/01-problem-solving/1-Workshop.md index c828be1..a18fbd1 100644 --- a/src/content/01-topics/01-problem-solving/1-Workshop.md +++ b/src/content/01-topics/01-problem-solving/1-Workshop.md @@ -21,12 +21,12 @@ ## 🧾 Official Questions & Solutions -| Question # | Title / Short Description | Question (Download) | Official Solution (Download) | -|------------|---------------------------------------------------------------|---------------------------------------------------------------|------------------------------------------------------------------| -| Q1 | Simple I/O and variables — read two numbers and print the sum | [Download PDF](./workshops/01-q1-question.pdf) | [01-q1-solution.cpp](./workshops/01-q1-solution.cpp) | -| Q2 | Type conversion — integer division vs floating point | [Download PDF](./workshops/01-q2-question.pdf) | [01-q2-solution.cpp](./workshops/01-q2-solution.cpp) | -| Q3 | Using `` — compute and format results | [Download PDF](./workshops/01-q3-question.pdf) | [01-q3-solution.cpp](./workshops/01-q3-solution.cpp) | -| Q4 | Edge cases & input validation | [Download PDF](./workshops/01-q4-question.pdf) | [01-q4-solution.cpp](./workshops/01-q4-solution.cpp) | +| Question # | Title / Short Description | Question (Download) | Official Solution (Download) | +| ---------- | ------------------------------------------------------------- | ---------------------------------------------- | ---------------------------------------------------- | +| Q1 | Simple I/O and variables — read two numbers and print the sum | [Download PDF](./workshops/01-q1-question.pdf) | [01-q1-solution.cpp](./workshops/01-q1-solution.cpp) | +| Q2 | Type conversion — integer division vs floating point | [Download PDF](./workshops/01-q2-question.pdf) | [01-q2-solution.cpp](./workshops/01-q2-solution.cpp) | +| Q3 | Using `` — compute and format results | [Download PDF](./workshops/01-q3-question.pdf) | [01-q3-solution.cpp](./workshops/01-q3-solution.cpp) | +| Q4 | Edge cases & input validation | [Download PDF](./workshops/01-q4-question.pdf) | [01-q4-solution.cpp](./workshops/01-q4-solution.cpp) | > [!note] Not available yet? > Some solutions will be uploaded after the workshop or assignment deadline. Check back later or ask your TA. @@ -43,7 +43,6 @@ - [Topic Q&A](../resources/qa.md) - [Workshop Slides](./workshops/01-basics-data-types/slides.pdf) -- [Professor Slides](../lectures/01-data-types/professor-slides.pdf) --- diff --git a/src/content/01-topics/01-problem-solving/2-Assignment.md b/src/content/01-topics/01-problem-solving/2-Assignment.md index 06b1c05..2343ef4 100644 --- a/src/content/01-topics/01-problem-solving/2-Assignment.md +++ b/src/content/01-topics/01-problem-solving/2-Assignment.md @@ -21,12 +21,12 @@ ## 🧾 Official Questions & Solutions -| Question # | Title / Short Description | Question (Download) | Official Solution (Download) | -|------------|---------------------------------------------------------------|---------------------------------------------------------------|------------------------------------------------------------------| -| Q1 | Simple I/O and variables — read two numbers and print the sum | [Download PDF](./workshops/01-q1-question.pdf) | [01-q1-solution.cpp](./workshops/01-q1-solution.cpp) | -| Q2 | Type conversion — integer division vs floating point | [Download PDF](./workshops/01-q2-question.pdf) | [01-q2-solution.cpp](./workshops/01-q2-solution.cpp) | -| Q3 | Using `` — compute and format results | [Download PDF](./workshops/01-q3-question.pdf) | [01-q3-solution.cpp](./workshops/01-q3-solution.cpp) | -| Q4 | Edge cases & input validation | [Download PDF](./workshops/01-q4-question.pdf) | [01-q4-solution.cpp](./workshops/01-q4-solution.cpp) | +| Question # | Title / Short Description | Question (Download) | Official Solution (Download) | +| ---------- | ------------------------------------------------------------- | ---------------------------------------------- | ---------------------------------------------------- | +| Q1 | Simple I/O and variables — read two numbers and print the sum | [Download PDF](./workshops/01-q1-question.pdf) | [01-q1-solution.cpp](./workshops/01-q1-solution.cpp) | +| Q2 | Type conversion — integer division vs floating point | [Download PDF](./workshops/01-q2-question.pdf) | [01-q2-solution.cpp](./workshops/01-q2-solution.cpp) | +| Q3 | Using `` — compute and format results | [Download PDF](./workshops/01-q3-question.pdf) | [01-q3-solution.cpp](./workshops/01-q3-solution.cpp) | +| Q4 | Edge cases & input validation | [Download PDF](./workshops/01-q4-question.pdf) | [01-q4-solution.cpp](./workshops/01-q4-solution.cpp) | > [!note] Not available yet? > Some solutions will be uploaded after the workshop or assignment deadline. Check back later or ask your TA. diff --git a/src/content/01-topics/01-problem-solving/3-Q&A.md b/src/content/01-topics/01-problem-solving/3-Q&A.md index 07d6a90..e69de29 100644 --- a/src/content/01-topics/01-problem-solving/3-Q&A.md +++ b/src/content/01-topics/01-problem-solving/3-Q&A.md @@ -1,28 +0,0 @@ -## ❓ Question 1 - -> Question: _“What’s the difference between `int` and `float` in C++?”_ - -> [!info] **Answer** -> `int` stores whole numbers without decimals, while `float` stores numbers with fractional parts. -> For example: -> - `int x = 5;` -> - `float y = 5.25;` - -📚 **Read more:** -- [Professor Slides](https://chatgpt.com/Slides/Topic.pdf) -- [Workshop Slides](https://chatgpt.com/Workshop/Workshop.pdf) -- [External Resource](https://cplusplus.com/doc/tutorial/variables/) - ---- - -### ❓ Question 2 - -> Question: _“Why do I need to use semicolons in C++?”_ - -> [!info] Answer -> Semicolons mark the end of a statement in C++. They help the compiler understand where one command finishes and the next begins. Without it, the compiler throws an error. - -📚 **Read more:** -- [Professor Slides](https://chatgpt.com/Slides/Topic.pdf) -- [External Resource](https://www.geeksforgeeks.org/basics-of-cpp/) - diff --git a/src/content/01-topics/02-basics-and-data-types/0-Overview.md b/src/content/01-topics/02-basics-and-data-types/0-Overview.md index 095bf53..3be36ed 100644 --- a/src/content/01-topics/02-basics-and-data-types/0-Overview.md +++ b/src/content/01-topics/02-basics-and-data-types/0-Overview.md @@ -1,18 +1,82 @@ # 🧭 Topic: Basics of C++ & Data Types + > [!info] Quick Overview > This topic introduces how to compile and run C++ code, basic input/output, variables, built-in data types, and the math library. > By the end, students will be able to write simple C++ programs using variables and standard input/output streams. --- ## 📌 Covered in This Topic +### Part 1 - Basics of C++ +- **History and Evolution of Computing** + - Origin of the term _computer_ + - Early computing devices + - Milestones in computer development +- **Binary and Logic Fundamentals** + - Why computers use binary + - Boolean logic and logic gates (AND, OR, NOT, XOR) + - Truth tables and simple logic circuits + - 32-bit vs 64-bit systems + - Data representation: + - Number systems (binary, decimal, hexadecimal) + - Signed numbers in binary + - Floating-point representation + - Character encoding: ASCII and Unicode +- **Introduction to Programming Languages** + - From machine code to assembly + - Evolution of high-level languages + - C++ in context: use cases and characteristics + - Low-level vs high-level abstraction +- **Compilers and Program Execution** + - How code becomes machine-executable + - Compiler vs interpreter + - Compilation workflow in C++ +- **First Steps in C++ Programming** + - Writing and compiling a simple C++ program + - Basic input and output (`cin`, `cout`) + - Adding comments and documentation +### Part 2 - Data Types and Variables -- Introduction to compilation and code editors -- `cin` / `cout` basic usage -- Variables and naming conventions -- Built-in data types (`int`, `float`, `double`, `char`, `bool`) -- Type conversion -- Using the math library +1. **Understanding Data in Programming** + - What is _data_ and how it’s represented in memory + - Relationship between data and variables +2. **Variables and Memory Basics** + - Declaring and initializing variables + - Variable scope and lifetime (brief intro) +3. **Fundamental Data Types in C++** + - Overview of primitive types (`int`, `float`, `double`, `char`, `bool`) + - Memory sizes and limits of each data type + - Signed vs unsigned integers +4. **Integers** + - Integer arithmetic and overflow behavior + - Type modifiers (`short`, `long`, `unsigned`) +5. **Floating-Point Numbers** + - Representation and precision limits + - Common rounding and comparison pitfalls + - Differences between `float`, `double`, and `long double` +6. **Characters and Text** + - Character literals and ASCII table + - Escape sequences and their meaning + - Brief Introduction to Unicode and text encoding + - Working with `std::string` +7. **Booleans and Logic** + - Boolean literals and expressions + - Type conversions to and from boolean +8. **Constants and Immutability** + - Declaring constants using `const` + - Benefits of using constants in programs +9. **Type Conversion and Casting** + - Implicit vs explicit type conversion + - `static_cast`, and C-style casts (intro level) +10. **Assignment and Operators** + - Simple and compound assignment + - Operator precedence overview (intro level) +11. **Naming Conventions and Code Style** + - Common naming conventions in C++ + - Writing clean and readable variable names +12. **Math Library Overview** + - Using `` for basic mathematical operations + - Common functions (`sqrt`, `pow`, `abs`, `round`, etc.) --- ## 📑 Slides & Materials @@ -46,3 +110,10 @@ _Add more useful links here as the course progresses._ > [!tip] Tip > If something doesn’t make sense — **don’t stay stuck alone**. Ask the TA to clarify it right away. Often, a quick question can save you a lot of time and frustration. Remember: if you’re confused, chances are others are too. + + + + + + + diff --git a/src/content/01-topics/02-basics-and-data-types/2-Assignment.md b/src/content/01-topics/02-basics-and-data-types/2-Assignment.md index 06b1c05..a3c048c 100644 --- a/src/content/01-topics/02-basics-and-data-types/2-Assignment.md +++ b/src/content/01-topics/02-basics-and-data-types/2-Assignment.md @@ -11,6 +11,16 @@ > - If something doesn’t make sense, **ask a TA**. > - Check the [Q&A page](../resources/qa.md) for common questions and clarifications. +--- + +| Concept | Example Keywords | +| -------------- | ----------------------------- | +| Input/Output | `cin`, `cout`, `setprecision` | +| Integer math | `/`, `%`, precedence | +| Floating-point | rounding, precision | +| Math library | `sqrt`, `pow`, `abs` | + + --- ## 📦 Download All Solutions diff --git a/src/content/02-extras/shortcuts/vs code shortcuts.md b/src/content/02-extras/shortcuts/vs code shortcuts.md new file mode 100644 index 0000000..e69de29 diff --git a/src/content/README.md b/src/content/README.md deleted file mode 100644 index e144d39..0000000 --- a/src/content/README.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: Home ---- diff --git a/src/content/index.md b/src/content/index.md new file mode 100644 index 0000000..ce526a5 --- /dev/null +++ b/src/content/index.md @@ -0,0 +1,146 @@ +--- +title: Home +--- +# C++ Basic Programming – TA Team Initiative + +Welcome to the **C++ Basic Programming Course Repository** — a comprehensive, community-driven learning resource. + +This project is more than a collection of materials — it’s a living documentation of how our teaching team collaborates, mentors, and builds a hands-on learning experience for students. + +--- + +## 🎯 Purpose and Vision + +Our mission is to ensure that every student not only understands C++ concepts but can also **apply them confidently through coding, problem-solving, and projects.** + +We believe that **learning to code** should be an active, guided process — not a passive one. +To achieve that, we combine theory from lectures with practice, mentorship, and structured documentation. + +--- + +## 🧩 What This Repository Contains + +| Section | Description | +| ----------------- | ------------------------------------------------------------------------------------------- | +| **/overview/** | Conceptual overviews for each lecture week — theory summaries, examples, and key takeaways. | +| **/workshops/** | Hands-on guided activities for each topic, designed to help students learn by doing. | +| **/assignments/** | Weekly assignments that reinforce lecture material and build problem-solving skills. | + +All sections are written in **Markdown**, making them easy to read, modify, and publish (e.g., on GitHub Pages or Quartz). + +--- + +## 👩‍🏫 Our Teaching Model + +Our approach combines **theoretical coverage, active practice, and close mentorship**: + +1. **Weekly Lectures** + - Delivered by the professor. + - Introduce core programming concepts in C++. + +2. **Workshops** + - Designed and run by TAs. + - Translate concepts into hands-on coding experiences. + - Encourage collaboration and experimentation. + +3. **Assignments** + - Weekly exercises that challenge students to apply what they’ve learned. + - Reviewed and discussed with mentors. + +4. **Mentorship** + - Each TA mentors a small group of students. + - Provides personalized support, code reviews, and guidance. + - Builds a feedback loop between students, TAs, and the professor. + +--- + +## 🧭 Why We Document This + +We’re documenting everything we do for three major reasons: + +1. **Comprehensiveness for Learners** + Provide a high-quality, public resource for current students and self-learners outside the university. + +2. **Pedagogical Transparency** + Allow educators and future TA teams to see and improve upon our structure, methods, and materials. + +3. **Continuity and Growth** + Leave behind a foundation that future teaching teams or other institutions can build upon, adapt, and evolve. + +--- + +## 🧠 Course Topics Overview +| Week | Topic | Description | Overview | Workshop | Assignment | +| ---- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------------------------- | +| 1 | **Algorithmic Thinking & Problem-Solving** | Develop foundational skills in algorithm design: representing problems with flowcharts and pseudocode, and reasoning about step-by-step solutions. | [Overview](01-topics/01-problem-solving/0-Overview) | [Workshop](01-topics/01-problem-solving/1-Workshop) | [Assignment](01-topics/01-problem-solving/2-Assignment) | +| 2 | **Introduction to C++ & Basic Programming Constructs & Data Types** | Get started with C++: setting up the IDE, basic syntax, compiling and linking, and simple programs. Understand fundamental data types, expressions and operations | [Overview](01-topics/02-basics-and-data-types/0-Overview) | [Workshop](01-topics/02-basics-and-data-types/1-Workshop) | [Assignment](01-topics/02-basics-and-data-types/2-Assignment) | +| 3 | **Control Structures** | Move into control flow with logical operators, `if/else`, `switch`, loops, iteration and avoiding infinite loops. | [Overview](#) | [Workshop](#) | [Assignment](#) | +| 4 | **Functions & Modular Design** | Learn how to design and call functions in C++, including `void` vs return-type, parameter passing, overloading, and thinking in modular pieces. | [Overview](#) | [Workshop](#) | [Assignment](#) | +| 5 | **Arrays, Strings & Multidimensional Data** | Explore static arrays, C++ strings and multidimensional data structures. Incorporate memory-thinking in simple data manipulations. | [Overview](#) | [Workshop](#) | [Assignment](#) | +| 6 | **Advanced Functions & Recursion** | Deepen function usage with recursion, higher-level thinking about how functions call themselves, and problem-solving patterns that leverage recursion. | [Overview](#) | [Workshop](#) | [Assignment](#) | +| 7 | **Pointers & Dynamic Memory** | Dive into pointers, dynamic memory allocation/deallocation (e.g., `new`, `delete`), pointer arithmetic, and how memory model impacts correct usage of arrays/strings. | [Overview](#) | [Workshop](#) | [Assignment](#) | +| 8 | **File I/O, Structs & A Very Brief Introduction to Object-Oriented Concepts** | Work with file input/output streams, define and use `struct`s, and get a first glance at OOP mindset | [Overview](#) | [Workshop](#) | [Assignment](#) | +| 9 | **Mini Project** | Integrate the learned topics into a hands-on project: design, implement, test a moderately sized application showcasing applied algorithms, data structures and modular code. | [Overview](#) | [Workshop](#) | [Assignment](#) | +| 10 | **Final Project & Wrap-up** | Launch the final project with full guidelines: design documentation, coding standards, testing, and presentation. Wrap up with reflections and next steps in C++ or software development. | [Overview](#) | [Workshop](#) | [Assignment](#) | + +--- + +## 🌍 Long-Term Goals + +- Create a **sustainable, evolving educational model** that balances theory and practice. +- Encourage **open-source education** — anyone can learn from or contribute to our materials. +- Serve as a **baseline for future educators** in teaching programming effectively. + +--- + +## 🧑‍🤝‍🧑 The Team +- **Professor**: [Dr. Saeed Reza Kheradpisheh](https://github.com/SRKH) +- **Head Teaching Assistant:**[ Mehrdad Shirvani](https://github.com/MehrdadShirvani) +- **Teaching Assistants (Alphabetical by Last Name):** + - [Aeen Bolandian](https://github.com/aeen-bolandian/) + - [Ali Ghaedrahmat](https://github.com/aliGhaedrahmat/) + - [Aryan Ghasemi](https://github.com/aryanGh-imp) + - [Mahdi Hoseinpoor](https://github.com/MahdiHoseinpoor) + - [Mohammad Hossein Jaafari](https://github.com/MMDHosain) + - [Raha Rokni](https://github.com/raharokni) + - [Partow Roshani](https://github.com/PartowRoshani) + - [Soroush Saberi](https://github.com/Soroushsbr) + - [MohammadFazel Sadeghizad](https://github.com/Sadeghizad) + - [Sadra Seyedtabaei](https://github.com/Sadra3st) + +## 🤝 Contributing + +We welcome contributions — whether you’re a TA, a student, or an educator from another institution. + +If you’d like to: +- Improve explanations or examples +- Add new workshop exercises +- Suggest assignment ideas +- Translate materials + +Please open a **pull request** or contact us. + +--- + +## 🏗️ Tech Stack + +If this repository includes interactive code or materials, consider mentioning: +- **Markdown** for documentation +- **C++** for code examples +- **GitHub Pages / Quartz** for deploying the website +- **VS Code** for coding environment + +--- + +## 📜 License + +All materials are shared under the **Creative Commons Attribution-NonCommercial-ShareAlike (CC BY-NC-SA)** license. +You’re free to learn, adapt, and build upon our content — just credit the authors and share alike. + +--- + +> — *C++ SBU CS TA Team, 2025* + + + +