These are the first 10 questions, there is a total of 42. The rest of the questions have been uploaded as a word file.
1.
A student is working on the pseudocode for converting measurements in feet and inches to only inches and produces the following steps:
[login to view URL] the number of input feet
[login to view URL] the number of input inches
[login to view URL] inches = input inches
4.
[login to view URL] Total Inches
Which Pseudocode is missing for step 4?
a. total inches = 12*input inches
b. total inches = 12*input feet
c. total inches = total inches + 12*input feet
total inches = total feet
2.
[login to view URL] speed = 2500;
2.
3.
[login to view URL](“The speed is between 1000 and 5000 (both inclusive).”);
5.}
Which piece of code, if placed on line 3, will enable the program to work as expected?
If (speed > 1000 and speed < 5000) {
if (speed >= 1000 && speed <= 5000){
if (speed > 1000 && speed < 5000)
if (1000< speed < 5000)
3.
1. int total = 0;
2. for (int i = 0; i<50; I +=2) {
3. total +=i;
4. }
5. [login to view URL](total);
Which block can replace lines 2 through 4 to produce the same result?
a. while(i<50){
total +=i;
}
b. int i=0;
while (i<50){
\ total +=i;
}
c. int i=0;
while (i<50){
total +=i;
i+=2;
}
d. while (int I < 50; i +=2){
total +=i;
}
4.
[login to view URL] i=0;
[login to view URL] (i<10){
3.
4.}
Which modification will prevent the infinite loop?
a. Replace the code on line 2 with the following code: do {
line 4: } while (i<10);
b. Replace the code on line 1 with the following code: int i=-1;
c. Add the following code to line 3: i++;
d. Replace the code on line 2 with the following code: while (i<=10){
5.
[login to view URL] [][] numbers = {
2. {6,7,8},
3. {10,11,12}
4.};
5.
[login to view URL] (int i=0; I < [login to view URL]; i++) {
7.
8. [login to view URL](numbers[i][j] + “ “);
9. }
10. }
Which line of code, if placed on line 7, will provide the output 6 7 8 9 10 11 12?
[login to view URL] (int j=0; j<i; j++){
[login to view URL] (int j=0; j < numbers[i].length; j++){
[login to view URL] (int j=0; j<1; j++){
[login to view URL] (int j=i; j<numbers[i].length; j++){
6.
1. try{
2. …..some code....
3. } catch (IOException e){
4. [login to view URL](“Caught IOException”);
5. } catch (Exception e) {
6. [login to view URL](“Caught Exception”);
7. } finally (
8. [login to view URL](“Done!”);
9. }
What is the program output if line 2 causes an IOException?
a. Caught IOException
Done!
b. Caught IOException
Caught Exception
Done!
c. Caught Exception
Done!
d. Done!
7.
A developer writes a method that requires a positive integer value.
Which option provides the codes users with the most error recovery posibilities?
a. Throw new Exception(“input must be positive”);
b. [login to view URL](“iinput must be positive”);
c. throw new IllegalArgumentException();
d. throw new IllegalArgumentException(“Input must be positive!”);
8.
int a = 10;
int b = 30;
b = a;
b = a+b;
[login to view URL](a + “ “ + b);
What is the output on the screen/
a. 10 30
b. 10 40
c. 10 20
d. 10 10
9.
1. double a = 15.6;
2. int b=3;
3. int c=(int) a/b;
What is the final value of c?
a. The code will not compile, error on line 3
b. 5.2
c. 5
d. 3.2
10.
int x=15;
int y=2;
x=x-y;
int z=x*y;
[login to view URL](x+” “+y+” “+z);
If the code is executed, what will be the output on the console?
a. 15 2 17
b. 13 26 30
c. 13 2 26
d. 2 15 30
Hi, I am Java expert and interested in this project. I have gone through the questions and confident to handle them perfectly. Please communicate so we can discuss further. Thank you.
Hello,
I am a Professional Software developer in Java. I can do this for you within few hours with all the correct answers. Please consider.
P.S. Few Hours mentioned because its late night and i will do your work once I wake up. It wont take more than an hour after I start.
Thanks.