Consider the following code fragment when answering questions 15 – 18. int x; St
ID: 3812053 • Letter: C
Question
Consider the following code fragment when answering questions 15 – 18.
int x;
String s;
Keyboard k;
x = 15;
s = “abcdefg”;
k = new Keyboard( );
Flag this Question
Question 145 pts
In the above code, s is considered to be
Flag this Question
Question 155 pts
In the above code, x is considered to be
Flag this Question
Question 165 pts
In the above code, Keyboard is considered to be
Flag this Question
Question 175 pts
In the above code, “abcdefg” is considered to be
Flag this Question
Question 188 pts
Suppose the documentation for the mystery method includes the following:
public static String mystery( int x, char y, double z, String s)
What type does the mystery method return?
How many things must be sent to mystery when it is called?
illegalExplanation / Answer
int x;
String s;
Keyboard k;
x = 15;
s = “abcdefg”;
k = new Keyboard( );
solution: the follwoing answer are written by considering the above code
145:s is considered to be object;
155:x is considered to be variable
165: keyboard is considered to be a class
175:abcdefg” is considered to bea a string
public static String mystery( int x, char y, double z, String s)
188:mystery method return string and 3 thing should be sent to mystery method
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.