In main
method, when you're calling getData(StudentReport1, average, gpa);
, the first argument you're sending is the name of the class, which doesn't make any sense at all. Instead, you need to send an instance of StudentReport1
class, which you can retrieve from the call to setData()
.
Update the code inside main
to:
StudentReport1 studentReport = setData();
//rest of the current code...
getData(studentReport , average, gpa);