Skip to content

helen-akateva/js-oop-fundamentals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript OOP Fundamentals

A practical JavaScript project demonstrating Object-Oriented Programming concepts including object methods, ES6 classes, private fields, and encapsulation principles.

📋 Description

This project implements three core JavaScript OOP concepts:

  1. Object Methods & Context - Working with object methods and the this keyword to manage customer data, balances, and order processing
  2. Storage Class - A class implementation with private fields for managing item collections with add/remove functionality
  3. StringBuilder Class - A string manipulation class demonstrating encapsulation and method chaining patterns

🚀 Demo

Live Demo

🛠️ Technologies

  • JavaScript (ES6+) - Classes, private fields, object methods
  • HTML5 - Structure and module scripts
  • GitHub Pages - Deployment

⚙️ Functionality

Task 1: Customer Object

  • Object with methods for balance management
  • Discount calculation and order processing
  • Working with this context

Task 2: Storage Class

  • ES6 class with private fields (#items)
  • Methods: getItems(), addItem(), removeItem()
  • Encapsulation and data privacy

Task 3: StringBuilder Class

  • String manipulation with private state
  • Methods: getValue(), padStart(), padEnd(), padBoth()
  • Immutable-style string building

📦 Installation

# Clone the repository
git clone https://github.com/helen-akateva/goit-js-hw-06.git

# Navigate to project directory
cd goit-js-hw-06

# Open in browser
# Simply open index.html or use a local server

🔗 Links

👤 Author

Olena Akatieva

About

JavaScript OOP fundamentals: object methods, ES6 classes, private fields, and encapsulation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors