Skip to content

sahariman/smart-city

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart City Management System – Islamabad Course: Data Structures – Semester Project Language: C++ (Console-Based Application) Developed by: Sahar E Iman, Sara Nasir, Mahnoor Faisal Version: 1.0

Overview The Smart City Management System is a console-based C++ application that simulates Islamabad as a smart city using core data structures such as Graphs, Trees, Hash Tables, Heaps, Queues, Stacks, and Linked Lists. Each module represents a different real-world city sector (Transport, Education, Medical, Commercial, Housing, etc.) and demonstrates how data structures manage and optimize complex systems

System Requirements Before running the project, ensure the following setup: Operating System: Works on Windows, Linux, or macOS. Compiler: Requires any C++17 or newer compiler such as g++, MinGW, Code::Blocks, Dev-C++, or Visual Studio. Memory: Needs a minimum of 512 MB RAM to run smoothly. Disk Space: Requires approximately 50 MB of free storage. Interface: Fully console-based — no GUI libraries or external frameworks needed

Setup Instructions Follow these steps to compile and run the project on your system:

  1. Download / Clone the Project   Download or copy all .cpp and .h files into a single folder, e.g.:   SmartCity/   │   ├── main.cpp   ├── CityGraph.cpp / CityGraph.h   ├── TransportSector.cpp / TransportSector.h   ├── EduTree.cpp / EduTree.h   ├── MedicalSector.cpp / MedicalSector.h   ├── CommercialSector.cpp / CommercialSector.h   ├── PopulationTree.cpp / PopulationTree.h   ├── AirportGraph.cpp / AirportGraph.h   ├── PublicFacilitySector.cpp / PublicFacilitySector.h   └── datasets.csv (optional)
  2. Open in Your IDE / Compiler   Open your preferred environment such as Code::Blocks, Dev-C++, etc
  3. Compile the Program   If using terminal or command prompt, navigate to the project folder and compile: g++ main.cpp -o SmartCity   If your program is divided into multiple .cpp files, compile them all together
  4. Run the Executable   Once compiled successfully, run the program using: ./SmartCity   or (on Windows): SmartCity.exe
  5. Navigate Through the Application   Once the application runs, the Main Menu will appear:   ============================================================   SMART CITY MANAGEMENT SYSTEM - ISLAMABAD   6 INTEGRATED SECTORS   ============================================================   QUICK ACCESS   ------------------------------------------------------------   1. Find Nearest Bus Stop   2. Find Shortest Path (Any to Any)   3. Find Nearest Hospital   4. Find Nearest School   5. Find Nearest Mall   6. Find Nearest Airport   7. Search For Registered Location   ------------------------------------------------------------   SEPARATE SECTORS   ------------------------------------------------------------   11. Transport Sector   12. Education Sector   13. Medical Sector   14. Commercial Sector (Malls)   15. Airport Sector   16. Population & Housing   17. Public Facilities   18. Buses   ------------------------------------------------------------   99. About System   0. Exit   ============================================================   Simply enter the number corresponding to the module you wish to explore.   Each sector (for example, Airport or Medical) has its own submenu.

Example Run Example 1: Finding the nearest hospital Enter your current location: G-10 Markaz Nearest Hospital: PIMS Hospital (500 meters) Path: G-10 Markaz → F-8 Kacheri → PIMS Hospital Example 2: Inaugurating a new airport Enter Airport ID: AP06 Enter Airport Name: Islamabad North Enter Latitude: 33.750 Enter Longitude: 73.100 Airport 'Islamabad North' inaugurated successfully!

Troubleshooting Invalid Input Error: Occurs when a non-numeric value is entered in the menu. 🔹 Solution: Enter a valid numeric choice (e.g., 1–18). Compilation Error: Happens when a header (.h) or source (.cpp) file is missing. 🔹 Solution: Ensure all required files are placed in the same folder and properly included. “Command Not Found” Message: Appears when the C++ compiler (e.g., g++ or MinGW) is not installed. 🔹 Solution: Install MinGW or GCC and correctly set your system’s PATH variable. No Output After Running: The program is likely waiting for user input. 🔹 Solution: Press ENTER or provide the required input (e.g., location name). Unexpected Program Exit: May result from an invalid memory access or missing data. 🔹 Solution: Verify all datasets are properly initialized before execution

About

A console-based C++ Smart City Management System for Islamabad, modeling transport, education, medical, commercial, and population sectors using graphs, trees, hash tables, heaps, and queues — built for a Data Structures semester project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages