Hi, can some one please help me run this code. i have another class named Course, that complied without error. Now in this code i am trying to take user inputs to find resulting gpa in a course. the following code does not compile, please help.
import java.util.*;
import javax.swing.*;
public class Result{
ArrayList courseResult;
//constructor
public Result(courseResult cr)
{
courseResult= cr;
}// end of constructor
public void addCourse(){
String name =JOptionPane.showInputDialog("Enter name of course: ");
//downcast all strings into int float etc
String inputMarks =JOptionPane.showInputDialog("Enter course marks: ");
int marks = Integer.parseInt(inputMarks);
String inputcHr =JOptionPane.showInputDialog("Enter course credit hours: ");
int creditHr =Integer.parseInt(inputcHr);
}
Course c1 = new Course(name, marks, creditHr);
courseResult.add(Course c1);
} //end of class