I got the program running guys thanks alot i just deleted everything and started again from scratch! Now I am having problems with :
// The constructor
public Grade ( string cname , int Studentident , int [] homework , int [] classwork , int [] midexam , int [] finalexam)
{
coursename = cname ;
Studentid = Studentident ;
hwgrade = homework ;
cwgrade = classwork ;
midegrade = midexam ;
finalegrade = finalexam ;
}
// trying to set the values
Grade grade = new Grade('m',1,1,1,1,1);
it is giving me an error cannot convert from int to int[]
You must pass in arrays, not single values:
intis not the same asint[], after all.The above assumes that your fields (such as
hwgrade) are declared asint[]and notint.If this is not the case, and the fields are actually integers and not integer arrays, you need to change the method signature to take integers instead of arrays: