{"id":21982224,"url":"https://github.com/idan-sh/s.m.p","last_synced_at":"2026-04-29T08:03:03.197Z","repository":{"id":137394179,"uuid":"606726654","full_name":"Idan-sh/S.M.P","owner":"Idan-sh","description":"Social Media Platform project as part of the academic course- Object Oriented Programming and C++","archived":false,"fork":false,"pushed_at":"2023-05-23T19:03:14.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T01:24:25.372Z","etag":null,"topics":["cpp","object-oriented-programming"],"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/Idan-sh.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":"2023-02-26T11:38:32.000Z","updated_at":"2023-05-21T13:24:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"98b10527-f37c-4ea0-b6c3-6e0f2d789c5a","html_url":"https://github.com/Idan-sh/S.M.P","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Idan-sh/S.M.P","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idan-sh%2FS.M.P","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idan-sh%2FS.M.P/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idan-sh%2FS.M.P/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idan-sh%2FS.M.P/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Idan-sh","download_url":"https://codeload.github.com/Idan-sh/S.M.P/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Idan-sh%2FS.M.P/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32416146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["cpp","object-oriented-programming"],"created_at":"2024-11-29T17:23:10.482Z","updated_at":"2026-04-29T08:03:03.183Z","avatar_url":"https://github.com/Idan-sh.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# S.M.P\na Social-Media-Platform made in C++ language.\n\n## 1) About\nSMP app allows members to socialize and communicate with their friends.   \nEach member is defined by a unique name, and his date of birth.   \n   \nThe member will be promped with a menu of options, and will choose the desired option to use by entering its option number. \n   \nThe database of `members` / `fan pages` will be read from a database file each time the app will run. All of the changes will be saved into this file after the exit option is chosen.    \n   \n\u003e In case the database file does not exist (as when running the program the first time), it will be created with a set of pre-made members and fan pages made for testing.   \n\u003cbr /\u003e\n\nThe program checks for `input errors`, and handles `exceptions` depending on their context.   \n\u003cbr /\u003e\n\n#### There is a high emphasis on:\n1. OOP principles: `abstraction`, `encapsulation`, `polymorphism`, `inheritance`\n2. `overloading` methods and operators\n3. `constructor` implementation\n4. `exception` handling\n\u003cbr /\u003e\n\n## 2) User Options\n### 2.1) Add a New Member\nCreates a new member and adds him to the database.   \nChecks for validity of the date of birth.   \n\nEach member consists of:\n* `name` - a unique name of the member, defined in the fan page class\n* `memberArray` and `statusArray` as defined in the fan page class\n* `date of birth` - a date struct containing: year (4 digits), month (1 or 2 digits), day (1 or 2 digits)\n* `fpArray` - array of pointers to the fan pages that the member is a fan of\n* `feedArray` - array of statuses posted in the member's feed\n* `memberNamesOfStatuses` - array of the member names for each status posted in the member's feed, with corresponding indexes between them\n\n\u003e The `Member` class inherits from the `fanPage` class.\n\u003cbr /\u003e\n\n### 2.2) Add a New Fan Page\nCreates a new fan page and edds it to the database.\na fan page represents a business or a shared interest.   \n\nEach fan page consists of:\n* `name` - a unique name of the fan page\n* `memberArray` - an array of members that are fans of this fan page\n* `statusArray`- an array of statuses that were posted in the fan page\n\u003cbr /\u003e   \n\n### 2.3) Add a Status to a Member / Fan Page\nCreates a new status and adds it to a member **OR** to a fan page's `statusArray`.   \nChecks for input errors, and lets the user choose if the status will be a   \n`Status (text)` / `ImageStatus` / `VideoStatus`.   \n\n\u003e The user will get an option to choose between the options.\n\nEach status has:\n* `content` - a description of the status image/video or some text\n* `timeOfUpload` - a string representing when the status was uploaded.\n\n\u003e The `ImageStatus` and `VideoStatus` classes inherits from the `Status` class.\n\u003cbr /\u003e\n\n### 2.4) Show All Statuses of a Member / Fan Page\nPrints to the screen all the statuses in the `statusArray` of a member / fan page.\n\n\u003e The user will get an option to choose between the options.\n\nThe format will be:\n```\n   On {time of upload}\n   {content}\n   {the type of the status - Status/ImageStatus/VideoStatus}\n```  \n\u003cbr /\u003e\n\nFor example for a `ImageStatus` uploaded by user1:\n```\n   On May 21 17:25:54 2012\n   hello im user1\n   This Image is in color\n```\n\u003cbr /\u003e  \n \n### 2.5) Show 10 of the Most Recent Statuses of a Member / Fan Page\nPrints the 10 most recent status posts of a member **OR** a fan page.   \n\n\u003e The user will get an option to choose between the options.\n\u003cbr /\u003e  \n\n### 2.6) Connect Two Members - Add a Friendship\n**Adds** a **friendship** between two **members**.   \nSearches the members in the `members` array of `SMP`, adds each one to the other's `memberArray`.   \n\u003cbr /\u003e  \n\n### 2.7) Disconnect Two Members - Remove a Friendship\n**Remove** a **friendship** that exists between two **members**.\nSearches for the members in the `members` array of `SMP`.   \n* If both found - tries to remove each member from the other's `memberArray`\n* If they are not friend - an exception will be thrown\n\u003cbr /\u003e  \n\n### 2.8) Add a Member as a Fan of a Fan Page\nAdd an existing member as a fan to an existing fan page.\nSearches for the member in the `members` array of `SMP`.   \nSeaches for the fan page in the `fanPages` array of `SMP`.   \n* If both found - tries to add the member to the fan page's `memberArray`, and tries to add the fan page to the member's `fpArray`\n* If at least one was not found - an exception will be thrown\n\u003cbr /\u003e  \n\n### 2.9) Remove a Member (a Fan) of a Fan Page\nRemove a fan to an existing fan page.\nSearches for the member in the `members` array of `SMP`.   \nSeaches for the fan page in the `fanPages` array of `SMP`.   \n* If both found - tries to remove the member to the fan page's `memberArray`, and tries to remove the fan page to the member's `fpArray`\n* If at least one was not found - an exception will be thrown\n\u003cbr /\u003e  \n\n### 2.10) Show All Members and Fan Pages in the system\nPrint all existing members in the `members` array of `SMP`,    \nPrint all existing fan pages in the `fanPages` array of `SMP`.   \n\u003cbr /\u003e  \n\n### 2.11) Show All Fans / Friends of a Fan Page / Member\nPrint all members that were set as fans of a fan page **OR**   \nPrint all the members that were set as friends of a member.  \n\n\u003e The user will get an option to choose between the options.\n\u003cbr /\u003e  \n\n### 2.12) Finish and Quit\nThis option will close the program and save all the `members`, `fan pages` and all of the changes made since starting the program into a `database` file.   \n\n\u003e Overwrites the database file if one already exists\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidan-sh%2Fs.m.p","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidan-sh%2Fs.m.p","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidan-sh%2Fs.m.p/lists"}