Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← Can We Mix Question Types - Intro to Java Programming

Get Embed Code
6 Languages

Showing Revision 4 created 05/25/2016 by Udacity Robot.

  1. It's good enough to provide a single method present question whose parameter is
  2. a question. A choice question is a special kind of a question, and so, you can
  3. pass a choice question into a method that expects a question. In general,
  4. anytime that you have a subclass, you can give it to any method that expects a
  5. super class object. Go ahead and try this out. Make a quiz that contains a
  6. question and a choice question. Just reuse that question that we had before,
  7. that asks who was the inventor of Java. Over here, both of the questions are
  8. paths to the single presentQuestion method. And in that method, just to make
  9. sure that you got the point, fill in the right type for the parameter.