Skip to content

Commit d35382f

Browse files
Wael JabeurWael Jabeur
authored andcommitted
add documentation
1 parent e15dcf9 commit d35382f

File tree

2 files changed

+96
-27
lines changed

2 files changed

+96
-27
lines changed

java/README.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Java Design Patterns Project
2+
3+
This repository demonstrates the implementation of various design patterns in **Java**, organized into three main categories: **Behavioral**, **Creational**, and **Structural**. Each pattern includes its implementation and corresponding unit tests using **JUnit**.
4+
5+
## Project Structure
6+
7+
The project is organized as follows:
8+
9+
```
10+
java/
11+
├── src/ # Source code
12+
│ ├── main/ # Main application code
13+
│ │ ├── behavioral/ # Behavioral design patterns
14+
│ │ ├── creational/ # Creational design patterns
15+
│ │ ├── structural/ # Structural design patterns
16+
│ ├── test/ # Unit tests
17+
│ ├── behavioral/ # Tests for behavioral patterns
18+
│ ├── creational/ # Tests for creational patterns
19+
│ ├── structural/ # Tests for structural patterns
20+
├── .gitignore # Ignored files and directories for Git
21+
├── pom.xml # Maven configuration (for dependencies and build)
22+
├── build.gradle # Gradle configuration (if using Gradle)
23+
├── README.md # Root project README
24+
```
25+
26+
---
27+
28+
## Design Pattern Categories
29+
30+
### Behavioral Patterns
31+
32+
Behavioral patterns focus on how objects interact and communicate with each other.
33+
34+
- [Observer](./src/main/behavioral/Observer.java)
35+
- [State](./src/main/behavioral/State.java)
36+
- [Strategy](./src/main/behavioral/Strategy.java)
37+
- [Mediator](./src/main/behavioral/Mediator.java)
38+
- [Command](./src/main/behavioral/Command.java)
39+
- [Chain of Responsibility](./src/main/behavioral/ChainOfResponsibility.java)
40+
41+
### Creational Patterns
42+
43+
Creational patterns deal with the process of object creation, making a system independent of how its objects are created.
44+
45+
- [Abstract Factory](./src/main/creational/AbstractFactory.java)
46+
- [Builder](./src/main/creational/Builder.java)
47+
- [Factory](./src/main/creational/Factory.java)
48+
- [Prototype](./src/main/creational/Prototype.java)
49+
- [Singleton](./src/main/creational/Singleton.java)
50+
51+
### Structural Patterns
52+
53+
Structural patterns focus on composing objects and classes into larger structures while keeping them flexible and efficient.
54+
55+
- [Adapter](./src/main/structural/Adapter.java)
56+
- [Bridge](./src/main/structural/Bridge.java)
57+
- [Composite](./src/main/structural/Composite.java)
58+
- [Decorator](./src/main/structural/Decorator.java)
59+
- [Facade](./src/main/structural/Facade.java)
60+
- [Proxy](./src/main/structural/Proxy.java)
61+
62+
---
63+
64+
## Testing
65+
66+
This project uses **JUnit** for testing. Each pattern has a dedicated test file located in the `test` folder under its respective category.
67+
68+
### Running Tests
69+
70+
#### Using Maven
71+
72+
To run the tests using **Maven**, execute the following command:
73+
74+
```bash
75+
mvn test
76+
```
77+
78+
---
79+
80+
## Configuration
81+
82+
### Maven
83+
84+
- `pom.xml`: Configures dependencies and the build system.
85+
86+
---
87+
88+
## Contributing
89+
90+
Contributions are welcome! Feel free to open an issue or submit a pull request.
91+
92+
---
93+
94+
## License
95+
96+
This project is licensed under the MIT License.

typescript/README.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -82,29 +82,6 @@ To run the tests, use the following commands:
8282

8383
---
8484

85-
## Getting Started
86-
87-
1. Clone this repository:
88-
89-
```bash
90-
git clone <repository-url>
91-
cd typescript
92-
```
93-
94-
2. Install dependencies:
95-
96-
```bash
97-
pnpm install
98-
```
99-
100-
3. Run tests to verify the setup:
101-
102-
```bash
103-
pnpm test
104-
```
105-
106-
---
107-
10885
## Configuration
10986

11087
### TypeScript
@@ -115,10 +92,6 @@ To run the tests, use the following commands:
11592

11693
- `vitest.config.mts`: Configures the test runner for the project.
11794

118-
### Makefile
119-
120-
- Automates common tasks such as running tests or linting.
121-
12295
---
12396

12497
## Contributing

0 commit comments

Comments
 (0)