Skip to content

ahmetk3436/ebebek_final_case

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Ebebek Final Case - Product Management System

Overview

This is a Java console application developed as a final case study for Ebebek. The application implements a comprehensive product management system that allows users to manage two types of electronic products: Mobile Phones and Notebooks. The system provides full CRUD (Create, Read, Update, Delete) operations with an intuitive console-based user interface.

πŸš€ Features

Core Functionality

  • Product Management: Add, delete, and list mobile phones and notebooks
  • Brand Management: Predefined brand system with 9 popular brands
  • Sorting & Filtering: List products by ID or brand name
  • Data Validation: Input validation and error handling
  • Interactive Console UI: User-friendly menu-driven interface

Product Types

Mobile Phones

  • ID, Name, Unit Price, Discount Rate
  • Stock Amount, Brand Name
  • RAM, Storage, Screen Size
  • Mobile-specific: Color, Battery Power

Notebooks

  • ID, Name, Unit Price, Discount Rate
  • Stock Amount, Brand Name
  • RAM, Storage, Screen Size

Supported Brands

  • Samsung, Lenovo, Apple, Huawei
  • Casper, Asus, HP, Xiaomi, Monster

πŸ—οΈ Architecture

The application follows Clean Architecture principles with clear separation of concerns:

Layer Structure

src/
β”œβ”€β”€ Entities/                 # Domain Models
β”‚   β”œβ”€β”€ domain/
β”‚   β”‚   └── Product.java      # Abstract base class
β”‚   β”œβ”€β”€ MobilePhone.java      # Mobile phone entity
β”‚   └── Notebook.java         # Notebook entity
β”œβ”€β”€ UseCases/                 # Business Logic
β”‚   β”œβ”€β”€ Abstract/
β”‚   β”‚   β”œβ”€β”€ IDataAccess.java  # Data access interface
β”‚   β”‚   └── IProduct.java     # Product operations interface
β”‚   └── Concrete/
β”‚       β”œβ”€β”€ DataAccessImpl.java    # Data access implementation
β”‚       β”œβ”€β”€ MobilePhoneImpl.java   # Mobile phone operations
β”‚       └── NotebookImpl.java      # Notebook operations
β”œβ”€β”€ Presentation/             # User Interface
β”‚   β”œβ”€β”€ Abstract/
β”‚   β”‚   └── IProductPresentation.java
β”‚   └── Concrete/
β”‚       └── ProductPresentation.java
└── defaultpackage/
    └── Main.java            # Application entry point

Design Patterns Used

  • Repository Pattern: Data access abstraction
  • Strategy Pattern: Different product type handling
  • Template Method: Common product operations
  • Dependency Injection: Constructor-based dependency injection

πŸ› οΈ Technical Implementation

Key Technologies

  • Java 11+: Core programming language
  • Java Collections: TreeSet for automatic sorting
  • Java Logging: Built-in logging framework
  • Scanner: Console input handling

Data Structures

  • TreeSet with Custom Comparators: Automatic sorting by brand name or ID
  • Enums: Type-safe brand and category definitions
  • Generics: Type-safe product operations

Error Handling

  • Comprehensive exception handling
  • Input validation with user-friendly error messages
  • Graceful error recovery

🚦 Getting Started

Prerequisites

  • Java Development Kit (JDK) 11 or higher
  • Any Java IDE (Eclipse, IntelliJ IDEA, VS Code)

Installation & Running

  1. Clone the repository:

    git clone <repository-url>
    cd ebebek_final_case
  2. Open in your IDE:

    • Import the ebebek_java_case project
    • Ensure Java build path is configured
  3. Run the application:

    cd ebebek_java_case/src
    javac defaultpackage/Main.java
    java defaultpackage.Main

    Or run directly from your IDE by executing Main.java

πŸ“± Usage Guide

Main Menu Options

  1. Notebook Operations - Manage notebook products
  2. Mobile Phone Operations - Manage mobile phone products
  3. Brands - View all available brands
  4. List All Products - Display all products by brand
  5. Exit - Close the application

Product Operations

For both product types, you can:

  • Add Product: Enter product details interactively
  • Delete Product: Remove product by ID
  • List by Brand: View products sorted by brand name
  • List by ID: View products sorted by ID

Sample Workflow

  1. Start the application
  2. Choose product type (Notebook/Mobile Phone)
  3. Select operation (Add/Delete/List)
  4. Follow the interactive prompts
  5. View results in formatted tables

πŸ“Š Sample Data

The application comes with pre-loaded sample data:

Mobile Phones:

  • Xiaomi mp-1: 15,000 TL, 8GB RAM, 128GB Storage
  • Casper mp-2: 9,000 TL, 4GB RAM, 64GB Storage

Notebooks:

  • Samsung pc-1: 10 TL, 16GB RAM, 512GB Storage
  • Xiaomi pc-2: 30 TL, 32GB RAM, 1024GB Storage
  • Asus pc-3: 30 TL, 32GB RAM, 256GB Storage

πŸ”§ Configuration

Logging

  • Uses Java's built-in logging framework
  • Log level set to INFO
  • Console output for user interactions

Data Storage

  • In-memory storage using TreeSet collections
  • Data persists during application runtime
  • Automatic sorting by brand name

πŸ§ͺ Testing

The application includes:

  • Input validation testing
  • Error handling verification
  • Menu navigation testing
  • CRUD operation validation

πŸ“ˆ Future Enhancements

  • Database Integration: Persistent data storage
  • REST API: Web service endpoints
  • GUI Interface: JavaFX or Swing interface
  • Unit Tests: Comprehensive test coverage
  • Configuration Files: External configuration
  • Export/Import: Data backup and restore

πŸ‘¨β€πŸ’» Development

Code Style

  • Follows Java naming conventions
  • Clean code principles
  • Comprehensive error handling
  • Modular design

Project Structure

  • Maven/Gradle compatible structure
  • Clear package organization
  • Interface-based design

πŸ“„ License

This project is developed as a case study for Ebebek.

🀝 Contributing

This is a case study project. For educational purposes, feel free to:

  • Fork the repository
  • Create feature branches
  • Submit pull requests
  • Report issues

Note: This application is designed as a console-based demonstration of Java programming concepts including OOP, design patterns, and clean architecture principles.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages