Description
Project Title: Car Insurance Calculator
Project Description: Create a web-based Car Insurance Calculator that allows users to estimate their insurance premium based on certain input parameters such as the car’s value, the driver’s age, and the type of insurance coverage required.
Features:
- Input Form:
- The main page should contain a form where users can input the following details:
- Car Value (in dollars)
- Driver’s Age (in years)
- Insurance Type (Basic or Comprehensive, provided as a dropdown menu)
- The main page should contain a form where users can input the following details:
- Calculate Button:
- After entering the necessary information, users should be able to click a “Calculate” button to get the insurance premium estimate.
- Premium Calculation:
- The application should calculate the insurance premium based on the following rules:
- For Basic insurance, the premium is 5% of the car’s value.
- For Comprehensive insurance, the premium is 10% of the car’s value.
- If the driver’s age is under 25, there should be an additional 2% premium.
- The application should calculate the insurance premium based on the following rules:
- Display Result:
- The calculated premium should be displayed clearly to the user, along with a breakdown of the input parameters and the final premium amount.
Technical Requirements:
- Frontend Technologies:
- Use HTML for structuring the page.
- Apply CSS for styling.
- Utilize Bootstrap for responsive design and UI components.
- Implement JavaScript for user interaction and premium calculation.
- User Interface:
- Create a user-friendly and visually appealing interface.
- Ensure input validation and user feedback for invalid inputs.
- Logic Implementation:
- Write JavaScript code to handle form submission, calculate the premium, and display the result.
- Implement conditional statements for premium calculation based on the rules mentioned above.
- Documentation:
- Provide clear comments in the code for understanding.
- Include a README file with instructions on how to run the application locally.
- Testing:
- Perform testing to ensure the accuracy of premium calculations.
- Verify the application’s functionality across different browsers and devices.