Java:
public class Students
{
String first;
String last;
int age;
String complexion;
int height;
int weight;
double bmi;
Students(String first,
String last,
int age,
String complexion,
int height,
int weight,
double bmi)
{
this.first=first;
this.last=last;
this.age=age;
this.complexion=complexion;
this.height=height;
this.weight=weight;
this.bmi=bmi;
}
public String getFirst()
{
return first;
}
public String getLast()
{
return last;
}
public int getAge()
{
return age;
}
public String getComplexion()
{
return complexion;
}
public int getHeight()
{
return height;
}
public int getWeight()
{
return weight;
}
public double getBmi()
{
return bmi;
}
}
import java.util.*;
public class CalculateGPA
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
ArrayList<Students> list=new
ArrayList<Students>();
int height = 0;
int weight = 0;
double bmi = height/ weight;
for(int i=0; i<5; i++)
{
System.out.print("Enter First Name: ");
String firstName=input.next();
System.out.print("Enter Last Name: ");
String lastName=input.next();
System.out.print("Enter Age: ");
int age=input.nextInt();
System.out.print("Enter Complexion: ");
String complexion=input.next();
System.out.print("Enter Weight: ");
int height=input.nextInt();
System.out.print("Enter Weight: ");
int weight=input.nextInt();
System.out.printf("\nResult: %d / %d = %d\n", height, weight, bmi );
{
list.add(new Students (firstName, lastName, age, complexion, height, weight,bmi));
}
for(Students s: list)
{
System.out.println(s.getFirst()+"\t"+s.getLast()+"\t"+s.getAge() +"\t"+s.getBmi());
}
}
}
}
<MOD EDIT: There, fixed it for you. Next time use the code tags>