<?xml version="1.0" encoding="UTF-8"?>
<quiz>
<!-- question: 2938156  -->
  <question type="coderunner">
    <name>
      <text>Class with Two Methods</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p>Write a Java class the has two methods inside of it. The first method should call the second method to execute add two numbers together which should then be printed.</p>
<p>Your code will look like this</p>
<p>public class ClassName</p>
<p>public void className</p>
<p>//your code</p>
<p>public static void main string args</p>
<p>//your code</p>
<p></p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text></text>
    </generalfeedback>
    <defaultgrade>10</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber></idnumber>
    <coderunnertype>java_class</coderunnertype>
    <prototypetype>0</prototypetype>
    <allornothing>1</allornothing>
    <penaltyregime>0, 10, 20, ...</penaltyregime>
    <precheck>0</precheck>
    <hidecheck>0</hidecheck>
    <showsource>0</showsource>
    <answerboxlines>25</answerboxlines>
    <answerboxcolumns>100</answerboxcolumns>
    <answerpreload></answerpreload>
    <globalextra></globalextra>
    <useace></useace>
    <resultcolumns></resultcolumns>
    <template></template>
    <iscombinatortemplate></iscombinatortemplate>
    <allowmultiplestdins></allowmultiplestdins>
    <answer>public class Body {
    
    public void myMethod(){
        int num1 = 8;
        int num2 = 7;
        int total = num1 + num2;
        System.out.println(total);
    }
    
    public static void main(String [] args){
        Body myObj = new Body();
        myObj.myMethod();
    }
}</answer>
    <validateonsave>1</validateonsave>
    <testsplitterre></testsplitterre>
    <language></language>
    <acelang></acelang>
    <sandbox></sandbox>
    <grader></grader>
    <cputimelimitsecs></cputimelimitsecs>
    <memlimitmb></memlimitmb>
    <sandboxparams></sandboxparams>
    <templateparams></templateparams>
    <hoisttemplateparams>0</hoisttemplateparams>
    <extractcodefromjson>1</extractcodefromjson>
    <templateparamslang>twig</templateparamslang>
    <templateparamsevalpertry>0</templateparamsevalpertry>
    <templateparamsevald>{}</templateparamsevald>
    <twigall>0</twigall>
    <uiplugin></uiplugin>
    <uiparameters></uiparameters>
    <attachments>0</attachments>
    <attachmentsrequired>0</attachmentsrequired>
    <maxfilesize>0</maxfilesize>
    <filenamesregex></filenamesregex>
    <filenamesexplain></filenamesexplain>
    <displayfeedback>0</displayfeedback>
    <giveupallowed>0</giveupallowed>
    <prototypeextra></prototypeextra>
    <testcases>
      <testcase testtype="0" useasexample="0" hiderestiffail="0" mark="1.0000000" >
      <testcode>
                <text>int num1 = 8;
int num2 = 5;
int total = num1 + num2;
System.out.println(total);
    
</text>
      </testcode>
      <stdin>
                <text></text>
      </stdin>
      <expected>
                <text>13</text>
      </expected>
      <extra>
                <text></text>
      </extra>
      <display>
                <text>SHOW</text>
      </display>
    </testcase>
      <testcase testtype="0" useasexample="0" hiderestiffail="0" mark="1.0000000" >
      <testcode>
                <text>
int num1 = 8;
int num2 = 7;
int total = num1 + num2;
System.out.println(total);</text>
      </testcode>
      <stdin>
                <text></text>
      </stdin>
      <expected>
                <text>15</text>
      </expected>
      <extra>
                <text></text>
      </extra>
      <display>
                <text>SHOW</text>
      </display>
    </testcase>
      <testcase testtype="0" useasexample="0" hiderestiffail="0" mark="1.0000000" >
      <testcode>
                <text>
int num1 = 1;
int num2 = 2;
int total = num1 + num2;
System.out.println(total);</text>
      </testcode>
      <stdin>
                <text></text>
      </stdin>
      <expected>
                <text>3</text>
      </expected>
      <extra>
                <text></text>
      </extra>
      <display>
                <text>SHOW</text>
      </display>
    </testcase>
      <testcase testtype="0" useasexample="0" hiderestiffail="0" mark="1.0000000" >
      <testcode>
                <text>
int num1 = 12;
int num2 = 50;
int total = num1 + num2;
System.out.println(total);</text>
      </testcode>
      <stdin>
                <text></text>
      </stdin>
      <expected>
                <text>62</text>
      </expected>
      <extra>
                <text></text>
      </extra>
      <display>
                <text>SHOW</text>
      </display>
    </testcase>
    </testcases>
  </question>

</quiz>