/Water_Tank

Primary LanguageJavaScript

Water Tank Problem

This project was developed as part of a task given by IoFactory. Below are the details of the input and output for the Water Tank Problem.

Task Description

Given n always greater than -1, representing the block height. Now compute the units of water stored in-between the blocks. Build a Web Application (Frontend Solution) using Vanilla JavaScript and HTML/CSS to represent the solution.

Input and Output Details

The system takes the following inputs: [0,4,0,0,0,6,0,6,4,0]

  • walls of the tank: the wall units of the water tank.
  • Water source: water captured inside the wall.

Based on these inputs, the system calculates and displays the following outputs:

  • Current Water Level: The water unit level.

Implementation

The implementation details include algorithms for water level prediction, giving visual representation

Visualization

Below is a visualization of the Water Tank Problem:

before giving inputs

Water Tank Visualization Before Giving Input

after giving inputs

Water Tank Visualization After Giving Input

Conclusion

This project showcases the application of software engineering principles to solve practical problems, emphasizing algorithmic thinking, system design, and user interface development.