{"id":24522165,"url":"https://github.com/mohammedmehdio/java_interface","last_synced_at":"2025-03-15T13:11:35.842Z","repository":{"id":271862192,"uuid":"914799980","full_name":"mohammedmehdio/java_interface","owner":"mohammedmehdio","description":"a simple Java-based order management system. It allows you to manage clients, products, and orders, and calculate the total invoice amount for a given order.","archived":false,"fork":false,"pushed_at":"2025-01-10T10:38:51.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T03:18:15.740Z","etag":null,"topics":["client","command","implement","interface","java","management","management-system","product"],"latest_commit_sha":null,"homepage":"","language":"Java","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/mohammedmehdio.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":"2025-01-10T10:30:46.000Z","updated_at":"2025-01-10T10:46:37.000Z","dependencies_parsed_at":"2025-01-10T11:51:12.005Z","dependency_job_id":null,"html_url":"https://github.com/mohammedmehdio/java_interface","commit_stats":null,"previous_names":["mohammedmehdio/java_interface"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammedmehdio%2Fjava_interface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammedmehdio%2Fjava_interface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammedmehdio%2Fjava_interface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammedmehdio%2Fjava_interface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohammedmehdio","download_url":"https://codeload.github.com/mohammedmehdio/java_interface/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243732292,"owners_count":20338839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["client","command","implement","interface","java","management","management-system","product"],"created_at":"2025-01-22T03:18:20.408Z","updated_at":"2025-03-15T13:11:35.823Z","avatar_url":"https://github.com/mohammedmehdio.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# java_interface\n# Java Order Management System\n\nThis project is a simple Java-based order management system. It allows you to manage clients, products, and orders, and calculate the total invoice amount for a given order.\n\n## Project Structure\n\n- `src/Client.java`: Defines the `Client` class with attributes `id` and `nom`.\n- `src/LigneCommande.java`: Defines the `LigneCommande` class with attributes `produit`, `prix`, and `quantite`.\n- `src/Main.java`: The main entry point of the application. It creates instances of `Metier`, `Produit`, `LigneCommande`, and `Client`, and calculates the invoice for a sample order.\n- `src/Metier.java`: Implements the `IMetier` interface, providing methods to manage orders and calculate invoices.\n\n## Classes\n\n### Client\n\nRepresents a client with an ID and a name.\n\n### LigneCommande\n\nRepresents a line item in an order, including the product, price, and quantity.\n\n### Main\n\nThe main class that initializes the application and demonstrates its functionality.\n\n### Metier\n\nImplements the business logic for managing clients, products, and orders.\n\n## Usage\n\n1. Clone the repository.\n2. Open the project in IntelliJ IDEA.\n3. Run the `Main` class to see the sample output.\n\n## Example\n\nThe `Main` class demonstrates how to create clients, products, and orders, and how to calculate the total invoice amount for an order.\n\n```java\npublic class Main {\n    public static void main(String[] args) {\n        // Create instance of Metier\n        Metier metier = new Metier();\n\n        // Create some products\n        Produit produit1 = new Produit(1, \"Laptop\", 1.0);\n        Produit produit2 = new Produit(2, \"Smartphone\", 00.0);\n        Produit produit3 = new Produit(3, \"Headphones\", 1.0);\n\n        LigneCommande lc1 = new LigneCommande(produit1, 1200, 10);\n        LigneCommande lc2 = new LigneCommande(produit2, 3200, 8);\n        LigneCommande lc3 = new LigneCommande(produit3, 200, 9);\n\n        Client c1 = new Client(1, \"mehdi\");\n        Client c2 = new Client(2, \"omar\");\n        Client c3 = new Client(3, \"salah\");\n\n        ArrayList\u003cLigneCommande\u003e al = new ArrayList\u003c\u003e();\n        al.add(lc1);\n        al.add(lc2);\n        al.add(lc3);\n\n        Commande cmd1 = new Commande(1, al, c1, \"23-04-2005\");\n        IMetier ts = new Metier();\n\n        System.out.println(ts.calculFacture(cmd1));\n    }\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammedmehdio%2Fjava_interface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammedmehdio%2Fjava_interface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammedmehdio%2Fjava_interface/lists"}