Skip to content

Academic C project implementing generic data structures (linked list, hash table, multi-value hash table) to manage entities in a daycare system.

Notifications You must be signed in to change notification settings

HadarShir/C-JerryDaycare-DataStructures

Repository files navigation

# Generic Data Structures and Daycare Management System (C)

## Overview
This academic project, written in **C**, focuses on building and managing **generic data structures**.  
It implements a **linked list**, **key-value pair**, **hash table**, and **multi-value hash table**, which together represent a **daycare system for managing “Jerrys”** (fictional entities from an interplanetary setting).

The system provides a **menu-driven interface** that allows the user to create, modify, and delete Jerrys and their attributes, demonstrating full control over memory and data abstraction.

---

## 🧩 System Architecture
- **Linked List (Generic):**  
  Implements insertion, deletion, traversal, and iteration with function pointers to handle generic types.  

- **Key-Value Pair Structure:**  
  Stores associations between string keys and generic values.  

- **Hash Table:**  
  Maps **Jerry names** (as keys) to their respective **Jerry structures** using dynamic memory allocation and hashing functions.  

- **Multi-Value Hash Table:**  
  Maps **attribute names** (as keys) to **linked lists of Jerrys** sharing those attributes, enabling efficient multi-key access.

- **Jerry and Planet Structures:**  
  Represent individual entities and their origins.  
  Stored in linked lists for dynamic scalability.

- **User Menu:**  
  Interactive text-based interface allowing users to:
  - Add or remove Jerrys  
  - Attach or detach attributes  
  - Query the data structures  
  - Display summaries and statistics  

- **Error Handling and Cleanup:**  
  On any allocation or operation failure, all data structures are safely released and the program terminates gracefully.

---

## ⚙️ Key Features
- Fully **generic implementation** using function pointers.  
- **Dynamic memory management** with strict leak prevention.  
- **Abstraction layers** separating logic, data, and user interface.  
- **Multi-key data retrieval** through multi-value hash mapping.  
- **Interactive menu system** for real-time data manipulation.

---

## 🧠 Technologies
- **Language:** C  
- **Paradigms:** Procedural Programming, Data Abstraction  
- **Data Structures:** Linked List, Hash Table, Multi-Value Hash Table, Key-Value Pair  
- **Memory Management:** Manual allocation (`malloc` / `free`) with validation  

---

## 👩‍💻 Author
Developed by **Hadar Shir**  
B.Sc. Information Systems and Software Engineering  
Ben-Gurion University of the Negev  

---

## 📚 Notes
This project demonstrates advanced understanding of **generic data structures**, **memory safety**, and **modular program design** in C.  
It emphasizes abstraction, extensibility, and safe handling of complex dynamic relationships between entities.

About

Academic C project implementing generic data structures (linked list, hash table, multi-value hash table) to manage entities in a daycare system.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published