❔ Creating a BMI and BMR project

Hey guys, I don't really understand really this project BMI and BMR.
46 Replies
Angius
Angius2y ago
What do you not understand about it?
The king of kings
I don't really know what to do! What's the purpose of the project?
Angius
Angius2y ago
I'm assuming a BMI and BMR calculator
The king of kings
Ok! BMI from what I understood i'ts all about gender, weight, length and age. I think this involves a calculation too. I need a bit explanation to understand the process
Angius
Angius2y ago
Wikipedia gives you a BMI equation Ask the user to enter what the equation needs Print out the result
The king of kings
Ok I mean is it calculating the weight, length? But what gender and age play role in this senario?
Angius
Angius2y ago
For BMI? They don't
The king of kings
Ok So in BMI it's all about calculating the weight and the length ?
Angius
Angius2y ago
What does the equation tell you?
The king of kings
Write a program to calculate BMI and BMR for both men and women. 1. BMI First, the program must calculate the BMI-Body Mass Index. BMI is a measure of the ratio between weight and height. This measurement is used, among other things, by the WHO (World Health Organization) to define overweight/obesity and should be seen as a guideline. The formula for calculating BMI is as follows: BMI = 1.3*weight(kg)/height(m)2.5 The program should print whether the person has a normal weight or not according to the following table. BMI table The table below applies to men and women over 18 years of age with a normal build. BMI under 18.5 underweight BMI 18.5–25 healthy and normal weight BMI 25–30 overweight BMI 30–40 severely overweight BMI over 40 extreme obesity 2. BMR
Angius
Angius2y ago
Well It's pretty clear
The king of kings
Well! Not for me 😁
Angius
Angius2y ago
What isn't clear? The user inputs their height The user inputs their weight You calculate the BMI
Angius
Angius2y ago
Then you check the value of it and print the user's obesity state If the BMI is 25 to 30, you print overweight And so on
The king of kings
Here is the important question! By calculating, you mean just multiplying?
Angius
Angius2y ago
Doing the math Calculating things means doing the math Whatever that math is 2 + 2 = 4 is calculating 7 * 825346725348i3745 is calculating
The king of kings
Aha! Ok! Ok! Well! BMI seems pretty easy. Is BMR is the same or is it a bit more complicated logic?
Angius
Angius2y ago
idk What does the exercise say? It gave you the equation for the BMI, so I assume it'll also give you one for BMR
The king of kings
Yes, it did. I can show you, one minute. It's in Swedish, so I need to translate it to English. The program will then calculate the BMR-basal metabolic rate. BMR is the daily energy requirement needed to maintain a person's vital organs at total rest. One of the formulas that can be used to calculate this is the Mifflin-st Jeor equation: Men: BMR (men) = 66.47 + (13.75 × weight in kg) + (5.003 × height in cm) − (6.755 × age in years) Women: BMR (women) = 655.1 + (9.563 × weight in kg) + (1.85 × height in cm) − (4.676 × age in years) Your program should prompt the user to enter their gender, height and weight, and age. The program must verify that entered values are valid. 50 [cm] ≤ length ≤ 220 [cm] // user's height 10 [kg] ≤ weight ≤ 250 [kg] // user's weight 18 [years] ≤ age ≤ 70 [years] // user's age The program should then print both bmi and bmr. Avoid the Swedish vowels äåö to name variables
Angius
Angius2y ago
Cool You have the equation So do the calculations
The king of kings
Ok I will try to write program and if I get stuck somewhere, the I'll get back to you. Thanks a lot bro I have one more question, would you help me out? Not very big one.
Angius
Angius2y ago
Shoot
The king of kings
Cool, thanks a lot 🤗 I'm building a project for a practice purpose. It's consisted of a bank that loans money to people to buy a house.
The king of kings
First step would be to create/ register an account for a customer. Since I would have a multiple customers. So I'm thinking about using an array instead of a list, since I've been using lists all the time and need to practice using arrays too.
Angius
Angius2y ago
If you want to have a set amount of customers, sure If you want to be able to add and remove new ones, not a good idea
The king of kings
Do you think array/ dictionary or list would do it? Ok! Well! I am going to need to add new customers every time someone applies for a loan, but not removing. So u think it's better to use lists or dictionaries instead?
Angius
Angius2y ago
ye
The king of kings
Ok! I will go with dictionaries then.
boiled goose
boiled goose2y ago
nobody thinks of SortedList 😢
The king of kings
What do you mean by this? You mean sorting algorithm?
boiled goose
boiled goose2y ago
it's sort of kinda like a dictionary (but it's an ordered list of KeyValuePair)
The king of kings
Ah! Ok! This seems new to me, is this belong to LINQ collection?
boiled goose
boiled goose2y ago
it's two normal system collections generic and nongeneric types
The king of kings
Aha! Ok! I think I should look that up to see the difference between generic & non-generic.
boiled goose
boiled goose2y ago
well one deals only with objects and the other with the type you specify
The king of kings
Ok! That's interesting to know. Wow! You have built the whole project using pretty much advanced logic than the typical code flow that I usually write so often using only attributes, methods, objects getting user inputs and lists followed with loops. I wonder how you used different concepts in this project and manage them altogether to produce the output/ result that's expected? I see you're using the following const AnsiConsole.MarkupLine => different than the regular pattern which's if (a => 10) bla bla ReadKey() ReadOnly enum you seem like a senior software developer lol.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
The king of kings
No not yet
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
boiled goose
boiled goose2y ago
it's a switch expression
The king of kings
Can you help me out in the other thread bro? This project is just distracting me.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.