{"id":26078227,"url":"https://github.com/jos-felipe/cpp-mod-04","last_synced_at":"2026-04-21T19:34:26.724Z","repository":{"id":260677002,"uuid":"882034866","full_name":"jos-felipe/cpp-mod-04","owner":"jos-felipe","description":"This module is designed to help you understand Subtype polymorphism, abstract classes and interfaces in CPP.","archived":false,"fork":false,"pushed_at":"2024-11-15T18:22:04.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-09T03:51:17.399Z","etag":null,"topics":["42","oop-concepts"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jos-felipe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-01T18:37:19.000Z","updated_at":"2024-11-15T18:22:08.000Z","dependencies_parsed_at":"2025-03-09T04:01:37.907Z","dependency_job_id":null,"html_url":"https://github.com/jos-felipe/cpp-mod-04","commit_stats":null,"previous_names":["jos-felipe/cpp-mod-04"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jos-felipe/cpp-mod-04","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jos-felipe%2Fcpp-mod-04","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jos-felipe%2Fcpp-mod-04/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jos-felipe%2Fcpp-mod-04/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jos-felipe%2Fcpp-mod-04/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jos-felipe","download_url":"https://codeload.github.com/jos-felipe/cpp-mod-04/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jos-felipe%2Fcpp-mod-04/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32106729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42","oop-concepts"],"created_at":"2025-03-09T03:50:26.001Z","updated_at":"2026-04-21T19:34:26.714Z","avatar_url":"https://github.com/jos-felipe.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C++ Module 04 - Subtype polymorphism, abstract classes, interfaces\n\nThis project explores fundamental Object-Oriented Programming concepts in C++98, focusing on polymorphism, abstract classes, and interfaces. It consists of multiple exercises demonstrating different aspects of OOP.\n\n## Key Concepts\n\n- Subtype polymorphism\n- Abstract classes\n- Interfaces (through pure abstract classes)\n- Deep vs. shallow copying\n- Memory management\n- Orthodox Canonical Form\n\n## Project Structure\n\n```\n.\n├── ex00/ (Polymorphism)\n├── ex01/ (I don't want to set the world on fire)\n├── ex02/ (Abstract class)\n└── ex03/ (Interface \u0026 recap)\n```\n\n## Exercise Details\n\n### Ex00: Polymorphism\n- Base `Animal` class with derived `Dog` and `Cat` classes\n- Virtual method implementation for `makeSound()`\n- Demonstrates proper virtual destructor usage\n- Includes wrong implementation example with `WrongAnimal` and `WrongCat`\n\n### Ex01: Deep Copy \u0026 Memory Management\n- Implementation of `Brain` class with 100 ideas\n- Deep copy demonstration in `Dog` and `Cat` classes\n- Proper memory allocation and deallocation\n- Array management of `Animal` objects\n\n### Ex02: Abstract Classes\n- Modified `Animal` class to be abstract\n- Prevents instantiation of base class\n- Demonstrates pure virtual functions\n\n### Ex03: Interfaces \u0026 RPG Game System\n- Implementation of various interfaces (`ICharacter`, `IMateriaSource`)\n- Concrete classes (`Character`, `MateriaSource`, `Ice`, `Cure`)\n- Inventory management system\n- Memory management for materias\n- Deep copy implementation\n\n## Implementation Details\n\n### Key Features\n- Memory leak prevention\n- Proper inheritance hierarchies\n- Virtual method implementations\n- Deep copy mechanisms\n\n### Memory Management\n- All classes properly handle memory allocation\n- No memory leaks in copy operations\n- Proper cleanup in destructors\n- Safe unequip operations\n\n## Build Instructions\n\n```bash\n# Compile \nmake\n\n# Run tests and check for leaks\nmake leaks\n```\n\n## Design Notes\n\n- Debug messages during object instation and destruction\n- Orthodox Canonical Form compliance\n- Color-coded console output for better readability\n\n## Requirements\n\n- C++98 standard\n- Compilation with Wall -Wextra -Werror flags\n- No memory leaks","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjos-felipe%2Fcpp-mod-04","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjos-felipe%2Fcpp-mod-04","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjos-felipe%2Fcpp-mod-04/lists"}