Semantic error porblem constructor
Bonjour a tous,
J'ai un problem quand j'execute mon code sur BlueJ. Voici mon code:
[code]
import java.util.*;
import java.util.ArrayList;
/**
* Class Student - Simple class representing a student and their marks
*
* @author Course Team
* @version 1.0
*/
public class Student
{
/* instance variables */
private String name; // String representing student's name
private List<Integer> tmaMarks; // list of student's TMA marks.
private int examMark; // student's exam mark. -1 indicates exam has not been taken
private int substitutionScore; // student's substitution score. -1 if not yet calculated
private int finalOCAS; // final continuous assessment score. -1 if not yet calculated
/**
* Constructor for objects of class Student
*/
public Student(String aName)
{
super();
this.name = aName;
this.tmaMarks = new ArrayList <Integer>();
this.examMark = -1;
this.substitutionScore = -1;
this.finalOCAS = -1;
}
Quand j'execute ce code dans BlueJ:
Student aStudent = new Student();
Je recois une semantic error:
Semantic error: Typed variable declaration : Constructor error: Can't find default constructor for: class Student
Je ne comprends pas, c'est exercise est tout simple, j'espere que se n'est pas Vista qui fait des caprices:oops: Je suis sure que je n'ai fait aucune erreures en declarant mon constructor.
Si quelqu'un vois la panne, svp aider moi:king: