Answer:
mathClass = Roster([('Jacob', 65), ('Frankie', 86), ('Lina', 94), ('Arnold', 63), ('Amanda', 87)])
Explanation:
An Instance of a class, refers to making a new object of that class. They belong to the class from which they are derived. The meaning of this is that every instance of a class that is created, will have its own set of variables with different values initialized by the constructor call, so we can make several objects of a class and define their behavior. In this question, we are asked to make a new instance of the class Roster called mathClass and at the constructor call we pass the variables of this new object as an argument.
Check below your score it should say something out of 5 you need to get more to get 5/5
Answer:
C)An error message is issued.
Explanation:
If we try to open a file for reading when that file does not exist, we will get an error message.
For example, in Java we will encounter a FileNotFoundException as in the code below:
try {
FileInputStream fis = new FileInputStream("myFile.txt");
DataInputStream dis = new DataInputStream(fis);
BufferedReader br = new BufferedReader(new InputStreamReader(dis));
String str = null;
while ((str = br.readLine()) != null) {
System.err.println(str);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
}
If the file myFile.txt does not exist we can expect to see an exception stack trace corresponding to FileNotFoundException.