Giter VIP home page Giter VIP logo

ngljcb / project_16251_dpfilesystem Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 30 KB

Repository showcasing software design patterns, part of a university course on software development methodologies. Includes implementations of Factory, Adapter, Composite, Observer, and more, with comprehensive examples and tests.

Java 100.00%
adapter composite design-patterns gof-patterns java observer software-design software-development strategy visitor

project_16251_dpfilesystem's Introduction

Design Patterns Practical Example: Filesystem

Overview

This project demonstrates the implementation of various software design patterns. It is part of a university course on software development methodologies, aiming to provide practical, clear examples to help understand and apply design patterns.

Table of Contents

Introduction

Design patterns are typical solutions to common problems in software design. This project includes several well-known design patterns, each illustrated with example code and detailed explanations.

Design Patterns Covered

This repository covers the following design patterns:

  1. Creational Patterns

    • Factory Method
  2. Structural Patterns

    • Adapter
    • Composite
  3. Behavioral Patterns

    • Observer
    • Strategy
    • Visitor

Folder Structure

project_16251_designpattern01/
├── src/
│   └── mp/
│       └── exercise/
│           └── filesystem/
│               ├── FileSystemDirectory.java
│               ├── FileSystemDirectoryResourceEvent.java
│               ├── FileSystemFile.java
│               ├── FileSystemResource.java
│               ├── FileSystemResourceAddedEvent.java
│               ├── FileSystemResourceEvent.java
│               ├── FileSystemResourceEventVisitor.java
│               ├── FileSystemResourceObserver.java
│               ├── FileSystemResourceRemovedEvent.java
│               ├── FileSystemResourceRenameEvent.java
│               ├── FileSystemVisitor.java
│               ├── FileSystemVisitorAdapter.java
│               └── utils/
│                   ├── DirectoryFilesCollectionSupplier.java
│                   ├── DirectoryFilesCollectorObserver.java
│                   ├── DirectoryLoggerObserver.java
│                   ├── FileSystemLsVisitor.java
│                   ├── FileSystemNonRecursiveLsVisitor.java
│                   ├── FileSystemPrinter.java
│                   ├── FileSystemUtils.java
│                   ├── ResourceLs.java
│                   ├── ResourceLsDecorator.java
│                   ├── ResourceLsName.java
│                   ├── ResourceLsSize.java
│                   └── ResourceLsType.java
└── tests/
    └── mp/
        └── exercise/
            └── filesystem/
                ├── FileSystemDirectoryTest.java
                ├── FileSystemFileTest.java
                ├── MockFileSystemResourceObserver.java
                └── utils/
                    ├── DirectoryFilesCollectorObserverTest.java
                    ├── DirectoryLoggerObserverTest.java
                    └── FileSystemPrinterTest.java

Getting Started

Prerequisites

  • Java Development Kit (JDK) 8 or higher

Installation

  1. Clone the repository:
    git clone https://github.com/ngljcb/project_16251_dpfilesystem.git
    cd project_16251_dpfilesystem

Usage

Each design pattern is implemented in a self-contained module. You can run the examples using your preferred Java IDE or through the command line.

Running an Example

  1. Navigate to the directory of the design pattern you want to run.
  2. Compile the Java files:
    javac src/mp/exercise/filesystem/*.java
  3. Run the main class:
    java src/mp/exercise/filesystem/Main

Testing

The project includes unit tests for the implemented design patterns.

project_16251_dpfilesystem's People

Contributors

ngljcb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.