What is wrong with this?? Here are the two classes...SandB ox and KittyKitty?? I need to also know what happens if two or more values are equal and if exactly two values are equal, does it matter whether the equal values are lower or higher than the third?? And can somebody please help me answer the questions at the bottom???
//A place to play with your kitty
public class SandBox
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System. in);
KittyKitty cat = new KittyKitty();
/////////////////////////////////////////////////////////////
// This is where you put YOUR code to have "cat"
// call ( use ) the methods ( services ,function , procedures)
// YOU have defined ( written ) in the class called KittyKitty
/////////////////////////////////////////////////////////////
int able = 10;
int cdef = 5;
String ghi = "good";
cat.myMethod_1( able, cdef, ghi);
}//End main()
}//End class definition
_______________ _______________ _______________ _______________ ______
public class KittyKitty {
{
/////////////////////////////////////////////////////////////
// Here is where you will write ( define ) the methods of
// this class
/////////////////////////////////////////////////////////////
public KittyKitty()
{
}//End constuctor
void myMethod_1( int able, int cdef, String ghi)
{
if( able < cdef)
{
System.out.prin tln("The answer is=" + ghi);
}// End if
System.out.prin tln("The answer is not=" + ghi);
}//End myMethod_1()
}//End class definition
_______________ _______________ _______________ _______________ ______
What is wrong with this and how do I rewrite it to produce the correct output??
if (total == MAX)
if (total < sum)
System.out.prin tln ("total == MAX and is < sum.");
else
System.out.prin tln ("total is not equal to MAX");
_______________ _______________ _______________ _______________ ______
Whats wrong with this and will it compile if it is part of an otherwise valid program? I'm supposed to explain
if (length = MIN_LENGTH)
System.out.prin tln ("The length is minimal.");
//A place to play with your kitty
public class SandBox
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System. in);
KittyKitty cat = new KittyKitty();
/////////////////////////////////////////////////////////////
// This is where you put YOUR code to have "cat"
// call ( use ) the methods ( services ,function , procedures)
// YOU have defined ( written ) in the class called KittyKitty
/////////////////////////////////////////////////////////////
int able = 10;
int cdef = 5;
String ghi = "good";
cat.myMethod_1( able, cdef, ghi);
}//End main()
}//End class definition
_______________ _______________ _______________ _______________ ______
public class KittyKitty {
{
/////////////////////////////////////////////////////////////
// Here is where you will write ( define ) the methods of
// this class
/////////////////////////////////////////////////////////////
public KittyKitty()
{
}//End constuctor
void myMethod_1( int able, int cdef, String ghi)
{
if( able < cdef)
{
System.out.prin tln("The answer is=" + ghi);
}// End if
System.out.prin tln("The answer is not=" + ghi);
}//End myMethod_1()
}//End class definition
_______________ _______________ _______________ _______________ ______
What is wrong with this and how do I rewrite it to produce the correct output??
if (total == MAX)
if (total < sum)
System.out.prin tln ("total == MAX and is < sum.");
else
System.out.prin tln ("total is not equal to MAX");
_______________ _______________ _______________ _______________ ______
Whats wrong with this and will it compile if it is part of an otherwise valid program? I'm supposed to explain
if (length = MIN_LENGTH)
System.out.prin tln ("The length is minimal.");
Comment