{
  "id": "6guwuVmxHmLkYi1q",
  "createdBy": "15sg55y5KVFu",
  "dateCreated": 1713192447956,
  "name": "Lab-Linux: C++ Programming",
  "meta": {
    "logo": "https://raw.githubusercontent.com/edrys-labs/lab-linux/main/media/cpp.jpg",
    "description": "This C++ programming course introduces young students to the basics of one of the most widely used programming languages in the world. Starting with a simple \"Hello, World!\" program, students will learn the foundational concepts of C++ and how to interact with the computer through code. As they progress, they'll enhance their program to accept user input, and they'll also learn how to identify and correct common errors, which are important skills in coding. This course is designed to make C++ approachable and engaging for young learners, fostering both critical thinking and creative problem-solving skills.",
    "selfAssign": true,
    "defaultNumberOfRooms": 0
  },
  "members": {
    "teacher": [],
    "student": []
  },
  "modules": [
    {
      "url": "https://raw.githubusercontent.com/edrys-labs/module-markdown-it/2.0.0/index.html",
      "config": "# Welcome to Lab-Linux: C++ -Programming\nC++ is a super cool programming language that's like a toolset for building all sorts of computer programs, from games to apps that help airplanes fly! It's known for being fast and powerful, which makes it perfect for creating software that needs to run quickly and efficiently.\n## Why C++ is Exciting for Young Programmers:\n1. **Make Anything**:\n   C++ can be used to make almost anything in the digital world.\n   It's used to develop video games, desktop apps, operating systems, and even helps in programming robots!\n\n2. **Fast and Powerful**:\n   C++ is known for its speed, which is why it's used by programmers who work on cutting-edge tech projects.\n   If you like the idea of making software that works super fast, C++ might be the right language to learn.\n\n3. **Popular and Useful**:\n   Lots of your favorite computer games and programs are made with C++.\n   By learning C++, you're learning a language that professionals use to create some of the coolest technology out there!\n\n4. **Challenging but Rewarding**:\n   C++ might be a bit more challenging to learn than some other programming languages, but it's really rewarding.\n   You get to understand more about how computers work, and it gives you a strong foundation for learning other coding languages too.\n\n## Introduction to C++ and Programming\nC++ was created by Bjarne Stroustrup in the early 1980s as part of his PhD project. It was originally called \"C with Classes\" because it allowed programmers to use something called 'classes' in addition to everything that was already in C. These classes help programmers organize code better and make more complex programs easier to manage.\nC++ is a versatile language that supports both procedural and object-oriented programming, making it highly adaptable for different types of software projects. It lets you control very precisely how your program uses the computer’s memory; this control can help your programs run faster and use less space.\nBecause of these features, C++ is used by competitive programmers who participate in coding competitions, as well as in practical, professional settings like software development, game design, and even in systems that operate spacecraft.\nLearning C++ teaches you discipline and attention to detail, which are great skills not just for programming, but for life. By starting to learn C++ as a young student, you're setting yourself up for a great future in any field where problem-solving and precision are important.\n__Visit a station by clicking onto it and then explore the terminal ;-)__",
      "studentConfig": "",
      "teacherConfig": "## Welcome for Teachers\n> This can be used as a base laboratory to create further and more elaborate labs with [edrys-Lite](https://edrys-labs.github.io). > You are currently in the Lobby. > If there is a station available you can switch to it and try out the terminal. > Otherwise, if you are in teacher-mode you can share a lab by clicking onto `setting` >> `station` and then by clicking the presented link, > which is the same as the current link, but only with the word `station` instead of `classroom`.",
      "stationConfig": "",
      "showInCustom": "lobby",
      "width": "full",
      "height": "huge"
    },
    {
      "url": "https://edrys-labs.github.io/module-editor/index.html",
      "config": {
        "editorText": "Starting text in editor...",
        "runCommand": "execute",
        "language": "cpp",
        "theme": "light"
      },
      "studentConfig": "",
      "teacherConfig": "",
      "stationConfig": "",
      "showInCustom": "station",
      "width": "full",
      "height": "medium"
    },
    {
      "url": "https://raw.githubusercontent.com/edrys-labs/module-markdown-it/2.0.0/index.html",
      "config": "# Welcome to the Station\n## Tutorial Part 1: Your First C++ Program\nLet’s begin by writing a basic program that outputs \"Hello, World!\" to the screen.\n2. **Type or Copy the Following C++ Code into the Editor**:\n\n   ```cpp\n   #include <iostream>\n\n   int main() {\n       std::cout << \"Hello, World!\" << std::endl;\n       return 0;\n   }\n   ```\n\n3. **Run the Program**:\n   Press the run button in your online editor.\n   You should see the output `Hello, World!` displayed on the screen.\n   Congratulations, you’ve just created and run your first C++ program!\n\n#### Tutorial Part 2: Enhance Your Program\nNow, let's modify your program to interact with the user by asking for their name and then greeting them personally.\n1. **Modify Your Program**:\n\n   ```cpp\n   #include <iostream>\n   #include <string>\n\n   int main() {\n       std::string name;\n       std::cout << \"Enter your name: \";\n       std::getline(std::cin, name);\n       std::cout << \"Hello, \" << name << \"!\" << std::endl;\n       return 0;\n   }\n   ```\n\n2. **Run the Program**:\n   When you execute this program, it will ask for your name.\n   Type your name into the input box and press enter.\n   You should see a message that greets you by name.\n\n#### Tutorial Part 3: Introduce an Error\nTo help understand error handling, let’s introduce a mistake in the code.\n1. **Introduce an Error**: Modify the `#include` directive incorrectly:\n  \n   ```cpp\n   #include <iostream>\n   // Error introduced here: \"sting\" should be \"string\"\n   #include <sting>\n   ```\n\n2. **Run the Program and Observe the Error**:\n   The compiler will display an error message stating something like \"fatal error: sting: No such file or directory\", indicating it can't find a file called \"sting\".\n\n3. **Fix the Error**:\n   Correct the spelling from `sting` to `string` and run your program again.",
      "studentConfig": "",
      "teacherConfig": "",
      "stationConfig": "## Instructions for Station-Sharing \n\nYou are currently responsible for sharing a station of this lab.\nYou have multiple options to share a or your terminal.\nTherefor we use the pyxtermjs - terminal server from:\n\nhttps://github.com/edrys-labs/module-pyxtermjs\n\n### Using Docker\n\nIf you haven't done it so far, install [docker](https://docs.docker.com/engine/install/).\nOr, follow one of the instruction-videos for your system:\n\n<details>\n<summary>Install Docker on Linux</summary>  \n<iframe\n  style=\"width: 100%; aspect-ratio: 16 / 9\"\n  src=\"https://www.youtube.com/embed/cqbh-RneBlk?si=juvUM5d2OSZ28WBv\"\n  title=\"YouTube video player\"\n  frameborder=\"0\"\n  allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n  referrerpolicy=\"strict-origin-when-cross-origin\"\n  allowfullscreen></iframe>\n</details>\n\n<details>\n<summary>Install Docker on Windows</summary>\n<iframe\n  style=\"width: 100%; aspect-ratio: 16 / 9\"\n  src=\"https://www.youtube.com/embed/WDEdRmTCSs8?si=X0agStn1akNcZLGu\"\n  title=\"YouTube video player\"\n  frameborder=\"0\"\n  allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n  referrerpolicy=\"strict-origin-when-cross-origin\"\n  allowfullscreen></iframe>\n</details>\n\n<details>\n<summary>Install Docker on MacOS</summary>\n<iframe\n  style=\"width: 100%; aspect-ratio: 16 / 9\"\n  src=\"https://www.youtube.com/embed/-EXlfSsP49A?si=OZ_l4_2hDKb6ULQ_\"\n  title=\"YouTube video player\"\n  frameborder=\"0\"\n  allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n  referrerpolicy=\"strict-origin-when-cross-origin\"\n  allowfullscreen></iframe>\n</details>\n\nThen the only thing that is required is to run the following command:\n\n```bash\ndocker run -it -p 5000:5000 crosslab/edrys_pyxtermjs_development:latest\n```\n\nThis will download the pyxtermjs terminal-server from docker-hub and run it in a secure environment.\nIt contains support for:\n\n- `clojure`\n- `g++`\n- `gcc`\n- `golang`\n- `haskell`\n- `java`\n- `lua`\n- `mono`\n- `nodejs`\n- `python 3`\n- `r`\n- `rustc`\n\n### Using Python\n\nYou can also share your terminal directly via Python, visit the following project\n\nhttps://github.com/edrys-labs/module-pyxtermjs\n\n... the easiest way is to perform the following steps:\n\n``` bash\n# 1. clone the repository or download the folder manually\ngit clone https://github.com/edrys-labs/module-pyxtermjs\n\n# 2. install all required sources\npip3 install -r requirements.txt\n\n# 3. run the terminal-server\npython3 -m pyxtermjs --cors True --command bash --port 5000\n```",
      "showInCustom": "station",
      "width": "half",
      "height": "huge"
    },
    {
      "url": "https://edrys-labs.github.io/module-pyxtermjs/index.html",
      "config": "",
      "studentConfig": "",
      "teacherConfig": "",
      "stationConfig": {
        "server": "http://localhost:5000/pty",
        "execute": "execute",
        "script": "echo $CODE | base64 --decode > main.cpp\ng++ main.cpp && ./a.out",
        "enable": {
          "teacher": true,
          "student": true
        }
      },
      "showInCustom": "station",
      "width": "full",
      "height": "medium"
    }
  ]
}