public class Geek
{
private String name;
private int NumberOfQuestions;
public Geek(String name, int numQuestions)
{
this.name= name;
NumberOfQuestions=numQuestions;
}
public String getName()
{
return (name);
}
public int getNumberOfQuestions()
{
return (NumberOfQuestions);
}
boolean isEven (int num1, int num2)
{
NumberOfQuestions++;
boolean even;
if ((num1+num2)%2==0)
even= true;
else
even=false;
return even;
}
public int sum(int num1, int num2)
{
NumberOfQuestions++;
if (num1 == num2)
{
return num2;
}
int total = 0;
if(num1 <= num2)
{
while(num1<=num2)
//***********************************************************
Assignment 6
// Name: Ana Aguilar
// Title:
// Author: Ana Aguilar
// Description: We wrote a class definition that asks a Geek different
questions. We implemented several methods and only two
// instance variables in this class.We also filled out the file with the main
method that tests the methods defined in the Geek class.
// Time spent: 3 hours
// Date: 10/30/14
//**********************************************************