even the simple programs, while not super hard to understand, or even build...it is full of very dull...very tedious work!
like this for example. this is a program i made to calculate your TDEE or your Total Daily Energy Expenditure
here you all go....have fun with this one...just download bluej and copy paste it into a new
class once you create a new project. then just right click it and run void main (String[] args)
a console should pop up and you just enter your info, it will calculate the rest ^_^
if you dont know your bmi, go here BMI Calculator!
/**
* Write a description of class TDEE here.
*
* @author (Michael Sullivan)
* @version (3)
*/
import java.util.Scanner;
public class TDEE
{
public static void main(String [] args)
{
Scanner user_input = new Scanner(System.in);
Scanner User_Choice = new Scanner(System.in);
int Activity_Level = 0;
int BMR = 0;
double Alvl = 0;
double TDEE = 0;
System.out.print("Please enter your name: ");
String name = user_input.nextLine();
System.out.print("Please enter your BMR :");
BMR = user_input.nextInt();
System.out.print("Please enter your Gender :");
String gender = user_input.next();
System.out.println("Please Select Your Activity Level [0-5]");
System.out.println("[0] Resting (Sleeping, Reclining)");
System.out.println("[1] Sedentary (Minimal Movement)");
System.out.println("[2] Light (Sitting, Standing)");
System.out.println("[3] Moderate (Light Manual Labor,dancing)");
System.out.println("[4] Very Active (Team Sports,Hard Manual Labor)");
System.out.println("[5] Extremely Active (Full-time Athlete,Heavy Manual Labor)");
System.out.println("Enter the number corresponding to your activity level :");
Activity_Level = User_Choice.nextInt();
if(Activity_Level == 0 )
{
Alvl = 1;
}
else if(Activity_Level == 1)
{
Alvl = 1.3;
}
else if((Activity_Level == 2) && (gender.equalsIgnoreCase ("M")))
{
Alvl = 1.6;
}
else if((Activity_Level == 2) && (gender.equalsIgnoreCase ("F")))
{
Alvl = 1.5;
}
else if((Activity_Level == 3) && (gender.equalsIgnoreCase ("M")))
{
Alvl = 1.7;
}
else if((Activity_Level == 3) && (gender.equalsIgnoreCase ("F")))
{
Alvl = 1.6;
}
else if((Activity_Level == 4) && (gender.equalsIgnoreCase ("M")))
{
Alvl = 2.1;
}
else if((Activity_Level == 4) && (gender.equalsIgnoreCase ("F")))
{
Alvl = 1.9;
}
else if((Activity_Level == 5) && (gender.equalsIgnoreCase ("M")))
{
Alvl = 2.4;
}
else if((Activity_Level == 5) && (gender.equalsIgnoreCase ("F")))
{
Alvl = 2.2;
}
else
{
System.out.println("Error please select using 0-5");
}
TDEE = BMR * Alvl;
System.out.println("Name: " + name);
System.out.println("Gender: " + gender);
System.out.println("BMR: " + BMR + " calories");
System.out.println("Activity Factor: " + Alvl);
System.out.println("TDEE: " + TDEE + " calories");
}
}
this ^^^
all of this...up here, is what i do...every day....every single day i type many many many lines of code, some very different, some...very much the same....
java programming is very tedious work, i dont recommend it to anyone who likes doing many different things or hates doing the same things over and over and over and over and over and over and over and over and over and ov-...you get the idea....anyway...yeah XD
day uhmm...-checks-....8! day 8 coming soon ^_^
day uhmm...-checks-....8! day 8 coming soon ^_^
No comments:
Post a Comment