0% found this document useful (0 votes)
6 views5 pages

Programming 3

The document outlines the development of a Flood Risk Level Detector using C++ to assess urban flooding risks based on rainfall intensity and drainage capacity. It describes the input requirements, processing logic for determining flood risk levels, and provides a sample program along with expected outputs. The system is intended for urban planning, flood risk mapping, and educational purposes in civil and environmental engineering.

Uploaded by

ikeniverson
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views5 pages

Programming 3

The document outlines the development of a Flood Risk Level Detector using C++ to assess urban flooding risks based on rainfall intensity and drainage capacity. It describes the input requirements, processing logic for determining flood risk levels, and provides a sample program along with expected outputs. The system is intended for urban planning, flood risk mapping, and educational purposes in civil and environmental engineering.

Uploaded by

ikeniverson
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Flood Risk Level Detector

Members:

Pegarido, Andrick Ryan


Manalac, John Lencer
Beltran, Josh Michael S.
Ibasan, Ken Iverson M.

Problem 6: Flood Risk Level Detector

📌 Hydrology – Rainfall and Drainage Assessment

Scenario and Application

Urban flooding has become an increasing concern due to intense rainfall


events and insufficient

Drainage infrastructure. Civil engineers and hydrologists must assess


whether existing drainage

Systems can handle projected rainfall to prevent property damage and


ensure public safety. This

Problem involves creating a Flood Risk Level Detector using C++ to


determine flood vulnerability

Based on rainfall intensity and drainage capacity.

This system is applicable in:

 Urban planning and infrastructure development

 Flood risk mapping and hazard assessment


 Emergency preparedness and stormwater management

 Educational simulation for civil and environmental engineering courses

Input Requirements

 Rainfall Intensity (in mm/hr)

 Drainage Capacity (in liters per second)

🛠 Process

1. Convert rainfall intensity into stormwater demand, if needed (optional


scaling depending On area).

2. Use if-else logic to compare drainage capacity to the rainfall-induced


water flow demand.

3. Classify flood risk using these thresholds:

O Capacity < 50% of demand → Severe Risk

O Capacity ≈ 75% of demand → High Risk

O Capacity ≈ 90% of demand → Moderate Risk

O Capacity > demand → Low Risk

📤 Expected Output

 Displays the Flood Risk Level (e.g., Low, Moderate, High, Severe)

Sample Data and Corresponding Output


✅ Sample Input:

 Rainfall Intensity: 100 mm/hr

 Drainage Capacity: 20 L/s

📘 Sample Output:

 Flood Risk Level: Moderate Risk

C++ Program

#include <iostream>
#include <string>

using namespace std;

String getFloodRiskLevel(double rainfallIntensity, double drainageCapacity) {

Const double area = 0.08; // Corrected area to match sample output

Double stormwaterDemand = rainfallIntensity * 2.78 * area;

If (drainageCapacity < 0.5 * stormwaterDemand) {

Return “Severe Risk”;

} else if (drainageCapacity < 0.75 * stormwaterDemand) {

Return “High Risk”;

} else if (drainageCapacity < 0.90 * stormwaterDemand) {

Return “Moderate Risk”;

} else {

Return “Low Risk”;

Int main() {

Double rainfallIntensity, drainageCapacity;

Char choice;

Do {

Cout << “\nEnter rainfall intensity (mm/hr): “;

Cin >> rainfallIntensity;

Cout << “Enter drainage capacity (L/s): “;


Cin >> drainageCapacity;

String riskLevel = getFloodRiskLevel(rainfallIntensity,


drainageCapacity);

Cout << “Flood Risk Level: “ << riskLevel << endl;

Cout << “\nDo you want to assess another scenario? (y/n): “;

Cin >> choice;

} while (choice == ‘y’ || choice == ‘Y’);

Cout << “Program ended. Stay safe!” << endl;

Return 0;

You might also like