/cpp-nested-linked-lists

This repository was created as a college assignment. It includes detailed explanations for each file, class, and method used. The project implements nested linked lists for handling basic file operations.

Primary LanguageC++

File Parsing and Storage in a Nested Linked List Structure

Introduction

The program reads a file containing text, breaks it into lines, and then further breaks each line into words. Each line is represented by a linked list, where each word is stored in a node of the linked list. Finally, all the lines are stored in another linked list.

Contents

Overview

This repository was created as a project assignment for college, implementing a linked list data structure in C++. The program reads a file containing text, breaks it into lines, and then further breaks each line into words. Each line is represented by a linked list, where each word is stored in a node of the linked list. Finally, all the lines are stored in another linked list.

Prerequisites

Before diving into the code, it is recommended to have the following knowledge:

  • Basic understanding of C++ fundamentals.
  • Familiarity with memory management and Pointers: Linked lists rely on dynamic memory allocation and pointer manipulation.
  • Basic understanding of object-oriented programming (OOP) concepts.
  • Knowledge of file handling operations, particularly reading files.

Pros

  • Using object-oriented programming (OOP).
  • Detailed explanations for each class file within README.md files.

Cons

  • Time and space complexity considerations are not optimized (we plan to do enhancements).

Classes Documentations

  • FileReader: A class for reading text files and extracting lines and words from them.
  • Node: A class representing a single node in a linked list, storing data and a pointer to the next node.
  • LineLinkedList: A linked list structure representing a single line of text, with each node containing a word.
  • MasterLinkedList: A linked list structure containing line-linked lists, forming a hierarchical structure for storing text data.
  • LinkedListProcessor: The main processing class that is responsible for parsing and storage of text data using linked lists.
  • Menu: A class that lets the user interacting with the program, by displaying a menu of operations and processing the operation they want to process.

Usage

To use this repository, clone it. and ensure that your IDE supports C++.

git clone https://github.com/khaledsAlshibani/cpp-nested-linked-lists.git

cd cpp-nested-linked-lists