I need to insert a new object and I'm really not sure where to put it.
the object is: Student myStudent = new Student(StudentName);
public class Students{
String studentName;
double midterm_grade;
double final_grade;
double total_grade;
Students n = new Students();
public static void main(String args[]){
String studentName;
double midterm_grade;
double final_grade;
int studentId;
Scanner input = new Scanner(System.in);
System.out.println(" ");
System.out.println(" Welcome to the University Grade Center ");
System.out.println(" ");
System.out.println("Enter the Students Name: ");
studentName = input.nextLine();
System.out.println(" Enter mid term grade: ");
midterm_grade = input.nextDouble();
System.out.println(" Enter final grade: ");
final_grade = input.nextDouble();
int number = (int)(Math.random() * 10000000);
studentId = (int)Math.random() * 10000000;
}
int studentId;
public String getStudentName(){
return studentName;}
public void setMidTermGrade(double g){
midterm_grade = g;}
public void setFinalGrade(double f){
final_grade = f;}
public double getStudentMidTermGrade(){
return midterm_grade;}
public double getStudentFinalGrade(){
return final_grade;}
public int getStudentId(){
return studentId;}
}