1-Write the code for invoking a method named sendObject . There is one argument for this method which is of type Customer . Assume that there is a reference to an object of type Customer , in a variable called John_Doe . Use this reference as your argument. Assume that sendObject is defined in the same class that calls it. 2-Write a conditional that assigns the boolean value true to the variable fever if the variable temperature is greater than 98.6 . So if temperature has the value 99.5, after your code executes fever would have the value true. On the other hand, if temperature has the value 96.3, your code will not change the value of fever at all. 3-Given the integer variables x , y , and z , write a fragment of code that assigns the smallest of x , y , and z to another integer variable min . Assume that all the variables have already been declared and that x , y , and z have been assigned values. So if the value of x is 19 the value of y is 13, and the value of z is 23, then after your code executes, the value of min would be 13. 4-Write the code for invoking a method named sendSignal . There are no arguments for this method. Assume that sendSignal is defined in the same class that calls it.



Source link

Leave a Reply

Your email address will not be published.