Question: I would like to know how I could develop object-oriented features of Javausing the code below. I would like to know in particular how the

I would like to know how I could develop object-oriented features of Javausing the code below. I would like to know in particular how the program could use:

describe how the program could use each of the following:

  1. class variables
  2. instance variables
  3. inheritance
  4. polymorphism
  5. abstract classes,
  6. "this"
  7. "super"
  8. interfaces
  9. event listeners

The actual file is below:

public class Quiz {  public static void main(String[] args)  {    Question question = new MultipleChoiceQuestion("Who is the president of the united states",          "Obama",          "Bush",          "Clinton",          "Trump",          "Nixon",          "D");      //every time we instantiate the object we call on check method      question.check();      question = new MultipleChoiceQuestion("What is the name of the Indonesia capitol",          "Yangon",          "Shanghai",          "Washingaton",          "Jakarta",          "London",          "D");      question.check();      question = new MultipleChoiceQuestion("What is the sum of 10 and 70",          "4344",          "222",          "87",          "80",          "45",          "D");      question.check();      question = new MultipleChoiceQuestion("What is the capitol of Pennesylvania",          "Harrisburg",          "Philadelphia",          "Scranton",          "Eary",          "June",          "A");      question.check();      question = new MultipleChoiceQuestion("What is 35 divided by 5",          "12",          "47",          "7",          "80",          "45",          "C");      question.check();            //true or false questions here      question = new TrueFalseQuestion("Nicolas Cage and Michael Jackson both married the same woman.", "true");      question.check();      question = new TrueFalseQuestion("The mathematical name for the shape of a Pringle is hyperbolic paraboloid.", "true");      question.check();      question = new TrueFalseQuestion("Michael Keaton's real name is Michael Jackson.", "FALSE");      question.check();      question = new TrueFalseQuestion("Donald Duck's middle name is Fauntelroy.", "TRUE");      question.check();      //lastly we show the results      question.showResults();  } } 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!