-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdataTypes.js
More file actions
25 lines (20 loc) · 737 Bytes
/
dataTypes.js
File metadata and controls
25 lines (20 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// This file defines the data types used by the rest of the program.
class MathProblems {
//Represents a math problem (question and right and wrong answers)
constructor(question, rightAnswer, wrongAnswer1, wrongAnswer2, wrongAnswer3) {
this.question = question;
this.rightAnswer = rightAnswer;
this.wrongAnswer1 = wrongAnswer1;
this.wrongAnswer2 = wrongAnswer2;
this.wrongAnswer3 = wrongAnswer3;
}
};
class Equation {
//Represents an equation with at least one variable
constructor(expression, answer, missingTerm) {
this.expression = expression;
this.answer = answer;
this.missingTerm = missingTerm;
}
};
module.export= MathProblems, Equation;