0% found this document useful (0 votes)
10 views3 pages

Assignment 1

Uploaded by

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

Assignment 1

Uploaded by

Шар
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment 1: BMI Calculator with Routing

Objective

The goal of this assignment is to build a BMI Calculator web application using Node.js, Express.js,
and basic HTML and CSS, following the principles of server-side routing.

Requirements

1. Project Structure:
o Organize your project with proper folders and files, including:
▪ views/ for HTML files.

▪ public/ for static assets such as style.css.


▪ server.js as themain entry point.
o Ensure all code follows clean, readable, and well-commented practices.

2. Functionalities:
o Create a form on the homepage (/) where users can enter their weight (in kg) and
height (in meters).
o Route the form submission to a /calculate endpoint.
o Process the BMI calculation in the backend and display the result on a new page.
▪ BMI formula: BMI = weight (kg) / (height (m) * height (m)).
o Categorize the BMI:
▪ Below 18.5: Underweight

▪ 18.5 - 24.9: Normal weight


▪ 25 - 29.9: Overweight
▪ 30 and above: Obesity
o Add a "Go back" link to the result page to return to the homepage.

3. Styling:
o Use CSS to ensure the pages are clean and user-friendly.

4. Error Handling:
o Ensure the application validates inputs (e.g., non-negative numbers for weight and
height).
o Display meaningful error messages when validation fails.

5. Additional Feature:
o Add additional fields for age and gender.
o Provide health tips based on the BMI result.
Submission Guidelines

1. Upload your complete project folder as a .zip file.


2. Ensure all required files are present and functional:
o views/index.html
o public/style.css
o server.js
3. Include a README.md file in your project directory explaining:
o How to run the application.
o Project description and functionality.

Evaluation Criteria

Criteria Description Weight


Project Structure - Proper folder and file 10%
organization
Functionality - Accurate BMI calculation 30%
and categorization
- Proper routing
implementation
Styling - Clean and user-friendly 10%
design
- Bonus for responsive design
Error Handling - Validation of user inputs 15%
- Proper error messages
Code Quality - Readable and commented 5%
code
Presentation and Defense - Clear demonstration of the 30%
application
- Explanation of routing and
server-side logic

Project Defense Requirements

● Language Requirement: The entire defense presentation must be conducted in English.


Presenting in Kazakh or Russian will result in a deduction of points.
● Demonstrate the full functionality of your application:
1. Start with the homepage and show the form.
2. Demonstrate the routing process by submitting the form and explaining how the
server handles the request.
3. Display and explain the result page and its elements.
4. Validate input errors to showcase error handling.
● Clearly explain how routing works in your application and how you used Node.js and
Express.js to achieve it.
● Defense Focus:

o Start by presenting the topic and functionalities.


o Step-by-step walkthrough of how the application meets each assignment criterion to
save time during evaluation.
o Be ready to answer questions about your code and project organization.

You might also like