{"id":25037415,"url":"https://github.com/stefanerrorerko/netlab4","last_synced_at":"2026-01-22T13:48:49.028Z","repository":{"id":40601837,"uuid":"507711138","full_name":"StefanErrorerko/NETLab4","owner":"StefanErrorerko","description":"Implementation of structural pattern Composite in C#","archived":false,"fork":false,"pushed_at":"2024-10-11T13:27:03.000Z","size":59,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-03T02:59:21.561Z","etag":null,"topics":["csharp","patterns","study-project"],"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/StefanErrorerko.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":"2022-06-26T23:56:49.000Z","updated_at":"2024-10-11T13:27:50.000Z","dependencies_parsed_at":"2025-03-30T21:36:44.940Z","dependency_job_id":null,"html_url":"https://github.com/StefanErrorerko/NETLab4","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/StefanErrorerko/NETLab4","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanErrorerko%2FNETLab4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanErrorerko%2FNETLab4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanErrorerko%2FNETLab4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanErrorerko%2FNETLab4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StefanErrorerko","download_url":"https://codeload.github.com/StefanErrorerko/NETLab4/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanErrorerko%2FNETLab4/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28664024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["csharp","patterns","study-project"],"created_at":"2025-02-06T01:49:04.527Z","updated_at":"2026-01-22T13:48:49.008Z","avatar_url":"https://github.com/StefanErrorerko.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NETLab4\n\nLab 4 | Design Patterns (Structural) | Composite\n\nMuzyka Stefan\nIS-02\nVariant 11\n\n## Task\nImplement a parse tree for an expression, based on the following syntax rules:\n```\n\u003cexpression\u003e ::= \u003csimple expression\u003e | \u003ccomplex expression\u003e\n\u003csimple expression\u003e ::= \u003cconstant\u003e | \u003cvariable\u003e\n\u003cconstant\u003e ::= (\u003cnumber\u003e)\n\u003cvariable\u003e ::= (\u003cname\u003e)\n\u003ccomplex expression\u003e ::= (\u003cexpression\u003e \u003coperator\u003e \u003cexpression\u003e)\n\u003coperator\u003e ::= + | - | * | /\n```\n\n## Explanation\nThe Composite pattern is implemented through the classes Component, Composite, and Leaf. They represent a tree-like structure of an expression.\n\n- Component is an abstract class that describes a part of the expression (either complex or simple).\n- Composite is a complex expression.\n- Leaf represents a simple expression (a constant or variable).\n- Connect is the class that describes mathematical operators (*, /, +, -).\n- Part is an abstract class that describes types of data: Number for constants and Variable for variables.\nThe expression is converted into an expression tree by the static class ExpressionParser.\n\n## Class Diagram\n![Untitled Diagram drawio](https://user-images.githubusercontent.com/76735417/186913289-42efdcc1-5aef-4beb-b25f-fd1b8bc08661.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanerrorerko%2Fnetlab4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanerrorerko%2Fnetlab4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanerrorerko%2Fnetlab4/lists"}