In this assignment, you will again modify your Quiz program from the previous assignment. You will create an abstract class called "Question", modify "MultipleChoiceQuestion" to inherit from it, and add a new subclass of "Question" called "TrueFalseQuestion". This assignment will again involve cutting and pasting from existing classes. Because you are learning new features each week, you are retroactively applying those new features. In a typical programming project, you would start with the full suite of features, enabling you to re-use code in ways natural to Java and avoid cutting and pasting. First create the new "Question" abstract class. • Open your "CS1102" project in Eclipse. • Select "New" -> "Class" from the File menu. •
public abstract class Question {
}
public class MultipleChoiceQuestion extends Question {
}
public class TrueFalseQuestion extends Question {
}
Comments
Leave a comment