-In the first call, the quotes should not be used .They indicate a string, not an integer.
-In the second call, the order should be : Paper, 50, 10
-In the third call, a parameter is missing.
Githiari answered the question on January 26, 2018 at 12:37
- We could rewrite the drawLogo method so that it has a single parameter: the drawing area.The rewritten method could use input dialogs to obtain...(Solved)
We could rewrite the drawLogo method so that it has a single parameter: the drawing area.The rewritten method could use input dialogs to obtain the drawing position from the user.What is the drawback of this approach considering a program in java programming language?
Date posted: January 26, 2018. Answers (1)
- Whereabouts will the logos be drawn in the following java codes
Int a = 10;
Int b = 20;
drawLogo (paper , a, b);
drawLogo(paper, b + a, b...(Solved)
Whereabouts will the logos be drawn in the following java codes
Int a = 10;
Int b = 20;
drawLogo (paper , a, b);
drawLogo(paper, b + a, b – a);
drawLogo (paper, b + a -3, b +a -4);
Date posted: January 26, 2018. Answers (1)
- There are 2.54 cm in an inch.Declare a constant in java programming language named cmPerInch, with the correct value.Show how it might be used in...(Solved)
There are 2.54 cm in an inch.Declare a constant in java programming language named cmPerInch, with the correct value.Show how it might be used in a calculation to convert inches to cm.
Date posted: January 26, 2018. Answers (1)
- What are the values of a, b, c, I, j, k after the following java code is executed
inti, j, k;
double a, b, c;
int n =...(Solved)
What are the values of a, b, c, I, j, k after the following java code is executed
inti, j, k;
double a, b, c;
int n = 3;
double y = 2.7;
i = (int)y;
j = (int) (y + 0.6);
k = (int) ( (double)n + 0.2);
a = n;
b = (int)n;
c = (int)y;
Date posted: January 26, 2018. Answers (1)
- What are the final values of m, n and s in the following java program?
Int m, n;
String s;
String v =’’3’’;
m =Integer.parseInt(v + v + ‘’4’’);
n...(Solved)
What are the final values of m, n and s in the following java program?
Int m, n;
String s;
String v =’’3’’;
m =Integer.parseInt(v + v + ‘’4’’);
n = Integer.parseInt(v + v) + 4;
s = Integer.toString(Integer.parseInt (v)
+ Integer.parseInt (v)) + ‘’4’’;
Date posted: January 26, 2018. Answers (1)
- Message dialogs can display a string.What do the following message dialogs display?
JOptionPane.showMessageDialog(null,
‘’5’’ +...(Solved)
Message dialogs can display a string.What do the following message dialogs display?
JOptionPane.showMessageDialog(null,
‘’5’’ + ‘’5’’ + 5 + 5);
JOptionPane.showMessageDialog(null,
‘’5’’ + ‘’5’’ + (5+5));
Date posted: January 26, 2018. Answers (1)
- Complete the following java program, adding assignments to split totalseconds into two variables : minutes and seconds
Int totalSeconds = 307;
(Solved)
Complete the following java program, adding assignments to split totalseconds into two variables : minutes and seconds
Int totalSeconds = 307;
Date posted: January 26, 2018. Answers (1)
- State the values that end up in a, b, c, and d, after these calculations are performed using java programming language.
Int a, b, c, d;
a...(Solved)
State the values that end up in a, b, c, and d, after these calculations are performed using java programming language.
Int a, b, c, d;
a = 7/ 3;
b = a* 4;
c = ( a + 1) /2;
d = c / 3;
Date posted: January 26, 2018. Answers (1)
- My salary is sh.20,000, and I agree to give you half using the following calculation in java:
Int half = 20,000 * (1/2);
How much do you...(Solved)
My salary is sh.20,000, and I agree to give you half using the following calculation in java:
Int half = 20,000 * (1/2);
How much do you get?
Date posted: January 26, 2018. Answers (1)
- In the following, what are the values of the variables after each statement when coding a java program?
Int a, b, c, d;
d = -8;
a =...(Solved)
In the following, what are the values of the variables after each statement when coding a java program?
Int a, b, c, d;
d = -8;
a = 1 * 2 + 3;
b = 1 + 2 * 3;
c = (1 + 2) * 3;
c = a + b;
d = -d;
Date posted: January 26, 2018. Answers (1)
- Explain the problem with this fragment of code:
Int a, b;
a = b;
b = 1;
(Solved)
Explain the problem with this fragment of code:
Int a, b;
a = b;
b = 1;
Date posted: January 26, 2018. Answers (1)
- Which of the following variables are allowed in Java, and which have the correct style?Volume, Area, Length, 3 sides, Sidel, length, Mysalary, Your salary, Screensize(Solved)
Which of the following variables are allowed in Java, and which have the correct style?
Volume
Area
Length
3sides
Sidel
length
Mysalary
Your salary
Screensize
Date posted: January 26, 2018. Answers (1)
- Write a program which draws a large ‘T’ shape on the screen.(Solved)
Write a program which draws a large ‘T’ shape on the screen.
Date posted: January 26, 2018. Answers (1)
- Create a program in java and name it DrawCircle.When the single button is clicked, it should draw a circle of pixel diameter.(Solved)
Create a program in java and name it DrawCircle.When the single button is clicked, it should draw a circle of pixel diameter.
Date posted: January 26, 2018. Answers (1)
- Define the term compiler as used in programming(Solved)
Define the term compiler as used in programming
Date posted: January 26, 2018. Answers (1)
- Write a program in java language to illustrate reverse sort of an array.The program should sort them in natural, alphabetical order using the default version...(Solved)
Write a program in java language to illustrate reverse sort of an array.The program should sort them in natural, alphabetical order using the default version of sort();
Date posted: January 26, 2018. Answers (1)
- State TWO main ways through which data is accessed in a storage media and give an example of a storage media in each case.(Solved)
State TWO main ways through which data is accessed in a storage media and give an example of a storage media in each case.
Date posted: January 26, 2018. Answers (1)
- What is a repeater?(Solved)
What is a repeater?
Date posted: January 26, 2018. Answers (1)
- Define the following terms (a)attenuation (b)bandwidth (c)multiplexing(Solved)
Define the following terms (a)attenuation (b)bandwidth (c)multiplexing
Date posted: January 26, 2018. Answers (1)
- Which device is used to rectify attenuation in a transmission medium?(Solved)
Which device is used to rectify attenuation in a transmission medium?
Date posted: January 26, 2018. Answers (1)