Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ashifhassandev/oop-examples-typescript

A repository containing OOP (Object-Oriented Programming) examples in TypeScript.
https://github.com/ashifhassandev/oop-examples-typescript

nodejs oop oop-examples oop-principles typescript

Last synced: 7 days ago
JSON representation

A repository containing OOP (Object-Oriented Programming) examples in TypeScript.

Awesome Lists containing this project

README

        

# OOP Examples in TypeScript

Welcome to the **OOP Examples in TypeScript** repository! This repository showcases Object-Oriented Programming (OOP) concepts implemented in TypeScript through real-world examples like e-commerce systems, library management, and vehicle systems.

## Table of Contents

- [About the Repository](#about-the-repository)
- [Project Structure](#project-structure)
- [Features](#features)
- [Getting Started](#getting-started)
- [Usage](#usage)
- [Contributions](#contributions)
- [License](#license)

## About the Repository

This repository demonstrates how to apply OOP principles in TypeScript, such as encapsulation, inheritance, polymorphism, and abstraction. Each example is a standalone system built with TypeScript to showcase real-world applications of OOP concepts.

## Project Structure

```plaintext
oop-typescript/
├── e-commerce-system/
│ └── eCommerceSystem.ts
├── library-management-system/
│ └── libraryManagementSystem.ts
├── vehicle-system/
│ └── vehicleSystem.ts
├── .gitignore
├── README.md
├── package-lock.json
├── package.json
├── tsconfig.json
```

## Features

- **OOP Concepts**: Encapsulation, inheritance, polymorphism, and abstraction demonstrated with practical examples.
- **Real-World Systems**: Examples like e-commerce, library management, and vehicle systems for hands-on learning.
- **TypeScript Best Practices**: Adherence to TypeScript conventions and best practices for OOP.

## Getting Started

### Prerequisites
- Install [Node.js](https://nodejs.org/).
- Install TypeScript globally:
```bash
npm install -g typescript
```

### Clone the Repository
```bash
git clone https://github.com/your-username/oop-typescript.git
cd oop-typescript
```

### Install Dependencies
```bash
npm install
```

### Compile TypeScript Files
```bash
tsc
```

### Run Examples
Use Node.js to execute the compiled JavaScript files:
```bash
node e-commerce-system/eCommerceSystem.js
```

Or, directly run TypeScript files using `ts-node` (if installed):
```bash
npx ts-node e-commerce-system/eCommerceSystem.ts
```

## Usage

1. **Explore OOP Concepts**: Navigate through folders to understand specific OOP implementations.
2. **Modify Examples**: Extend the provided examples to practice advanced concepts.
3. **Run Examples**: Compile and execute the TypeScript files to see the systems in action.

## Contributions

Contributions are welcome! Here's how you can contribute:

1. Fork the repository.
2. Create a new branch:
```bash
git checkout -b feature-new-oop-example
```
3. Commit your changes:
```bash
git commit -m "Add new OOP example: [Example Name]"
```
4. Push the branch:
```bash
git push origin feature-new-oop-example
```
5. Submit a pull request.

## License

This project is licensed under the [MIT License](LICENSE).

## Acknowledgments

Special thanks to the TypeScript community for providing excellent resources to advance OOP knowledge.

Happy Coding! 🚀