Gino Tamaca - Java Spring Boot Skill Assessment - Xobin
Gino Tamaca - Java Spring Boot Skill Assessment - Xobin
Gino Tamaca
[email protected]
Submitted On: Sep 12, 2023, 2:10:42 PM
From: Calamba, Calabarzon - Philippines
IP: 136.158.78.109
Summary
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 1/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
12
61.90% 13/21 min(s)
30
sec(s)
Quick Access
1 2 3 4 5 6 7 8 9 10 11 12
Q: 1
Answer by candidate: BC
Answer Status: Correct
1 /1
Q: 2
Which annotation informs Spring Boot that it should take an opinionated approach to configuring
the application ?
1 /1
Q: 3
1 /1
Q: 4
Which code snippet must fill the blank such that Actuator security rules are present and all
endpoints fetch for actuator?
2 /2
Q: 5
Spring Boot Actuator is being used inside a program. The output in a browser is:
{
"_links": {
"self": {
"href":"https://localhost:4000/actuator"
},
"health": {
"href":"https://localhost:4000/actuator/health"
}
}
}
0 /2
Q: 6
In an application, the Spring boot actuator is being used. The developer is using the below
endpoint:
http://localhost:4000/actuator/metrics/system.cpu.usage
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 3/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
Answer by candidate: {
"name":"system.cpu.usage",
"measurements":[
{
"statistic":"Data",
"value":1234
}
],
"availableTags":[
]
}
2 /2
Q: 7
A RESTFul web service is being built by a Spring developer. After adding required dependencies
and adding necessary code, the developer wrote the code below:
@SpringBootApplication
public class webApp{
public static void main(String[] args) {
SpringApplication.run(webApp.class, args);
}
}
Which among the given options correctly represents the outcome of this code?
2 /2
Q: 8
In a Spring boot application, a RESTful application was built up using Spring Data and the JSON on
the browser is:
{
"role" : 123,
"email" : "[email protected]",
"_links" : {
"websiteUser" : {
"href" : "http://localhost:4000/users/1"
}
}
}
Suppose you want to find all users with a role as 123, then which endpoint can you use?
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679
0 4/19
0
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
/2
Q: 9
A Record management microservice is needed to be used that makes use of Spring Data. The class
that the developer is using is RecordsServer.
The spring boot code which is correct for his use is:
2 /2
Q: 10
Consider the below java based code for a micro-service based spring boot application:
1 @Service
2 public class sampleApp {
3 @Autowired
4 @LoadBalanced
5 protected String sampleLink;
6 public WebAccountsService(String sampleLink) {
7 this.sampleLink = sampleLink.startsWith("www) ?
8 sampleLink : "www." + sampleLink;
9 }
10 .....
11 }
0 /2
Q: 11
Which of the following code segment can be used in Spring Boot for unit testing of the class named
"Member"?
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 5/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
2 /2
Q: 12
For unit testing in a Spring based application, a developer wrote the Spring boot code below:
@RunWith(SpringRunner.class)
@WebMvcTest(ManagerRestController.class)
public class ManagerRestControllerIntegrationTest {
@Autowired
private MockMvc mvc;
@MockBean
private ManagerPosition Position;
@Test
..............
//testcases
}
Answer by candidate: There would be only a single controller for test cases
Answer Status: Not Correct
0 /2
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 6/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
8
100.00% 16/16 min(s)
6
sec(s)
Quick Access
1 2 3 4 5 6 7 8 9 10
Q: 1
1 /1
Q: 2
Answer by candidate: ArrayList uses a dynamic array whereas LinkedList uses a doubly linked list.
Answer Status: Correct
1 /1
Q: 3
Choose the Java class that doesn’t implement the Set interface.
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 7/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
1 /1
Q: 4
The Java programming language can handle several types of Relationships. In Java, which of the
following options displays the Is-A Relationship?
2 /2
Q: 5
class Student
{
private int marks;
private Students()
{
marks = 45;
}
}
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 8/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
}
System.out.println(value);
System.out.println(value);
3 /3
}
}
3 /3
Q: 7
2 /2
Q: 8
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 9/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
Answer by candidate: Hiding the implementation and showing only the features.
Answer Status: Correct
1 /1
Q: 9
1 /1
Q: 10
1 /1
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 10/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
Section 3: Microservice
1
100.00% 4/4 min(s)
10
sec(s)
Quick Access
1 2 3
Q: 1
Which among the listed below is a problem that could be resolved with microservices?
1 /1
Q: 2
Which among the given below options is correct about both SOA and microservices?
Answer by candidate: They both require careful planning of where they will be useful and most effective.
Answer Status: Correct
2 /2
Q: 3
1 /1
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 11/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
11
100.00% 40/40 min(s)
46
sec(s)
Quick Access
1 2 3 4
Q: 1
Excel Sheet ( Functional Problem )
Problem Statement
Columns in Excel are named A,B,C...Z and AA,AB,AC....AZ and BA,BB...BZ and so on.
A -> 1
B -> 2...
Z -> 26
AA -> 27
AB -> 28
Given an input string containing column name in capital letters, complete the program to return
its corresponding column number.
What you need to do
Complete the code given in the editor below. Do not edit existing code. It is meant to help you.
Start typing your code in the editor after you see the message //Complete your code
Do not meddle with the Input and Output style mentioned in the editor.
--------------------------------------------------------------------------------
The above mentioned example is a sample test case for your understanding. The program will be
tested on other secret test cases in the backend. Make sure you click the SUBMIT button to save
and submit your answer.
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 12/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
1 import java.io.BufferedReader;
2 import java.io.InputStreamReader; 10 /10
3
4
5 class Main {
6 public static void main(String args[] ) throws Exception {
7
8 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
9 // read the name from the input
10 String s = br.readLine();
11
12 int column_number=0; //Initializing the resultant variable
13
14
15 for (int i=0;i<s.length();i++){
16
17 //Complete the Code
18 //Hint : You can use Map or charAt to achieve the result
19 column_number *= 26;
20 column_number += s.charAt(i) - 'A' + 1;
21
22 }
23
24 // print the Output
25 System.out.println(column_number);
26
27
28
29 }
30 }
Q: 2
The Factorials (DebugPro)
Problem Statement
An integer I is called a factorial number if it is the factorial of a positive integer. The first few
factorial numbers are 1,2,6.
0! = 1
1! = 1
2! = 1x2 = 2
3! = 1x2x3 = 6
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 13/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
4! = 1×2×3×4 = 24.
Given a number I, fix the errors in the program that prints all factorial numbers less than or equal
to I.
Input:
Each test cases contains an Integer I.
Output:
For each test case, print all the space separated factorial numbers smaller than or equal to I.
Example 1:
Input
10
Output
126
Example 2:
Input
25
Output
1 2 6 24
--------------------------------------------------------------------------------
The above mentioned example is a sample test case for your understanding. The program will be
tested on other secret test cases in the backend. Make sure you click the SUBMIT button to save
and submit your answer.
1 import java.io.BufferedReader;
2 import java.io.InputStreamReader; 10 /10
3
4
5 class Main {
6 public static void main(String args[] ) throws Exception {
7 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
8
9 String inp = br.readLine();
10 int num = Integer.parseInt(inp);
11 String outp = "1";
12
13 int fact = 1;
14 int count = 2;
15
16 while(true){
17
18 fact = fact * count;
19
20 if(fact > num){
21 break;
22 }
23 outp = outp+" "+fact;
24 count++;
25 }
26 System.out.println(outp);
27
28 }
29 }
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 14/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
Q: 3
Change the String (DebugPro)
Problem Statement
Given a string S, the task is to change the string according to the condition; if the first letter in a
string is capital letter then change the full string to capital letters, else change the full string to
small letters.
Your task is to fix the errors in the program to get the expected output.
Input:
The test case contains a string S.
Output:
For the test case, print the changed string in a new line.
Example 1:
Input:
boOTcamP
Output:
bootcamp
Example 2:
Input:
XoBIn
Output:
XOBIN
--------------------------------------------------------------------------------
The above mentioned example is a sample test case for your understanding. The program will be
tested on other secret test cases in the backend. Make sure you click the SUBMIT button to save
and submit your answer.
1 import java.io.BufferedReader;
2 import java.io.InputStreamReader; 10 /10
3 class Main {
4 public static void main(String args[] ) throws Exception {
5 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
6 String input_from_question = br.readLine();
7
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 15/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
Q: 4
Count Even (Functional Program)
Problem Statement
Given an array count the number of even elements in an array.
Complete the functions countEvens() to get the expected output.
Only edit the function and not the existing code.
Note
Edit only the function and not the existing code.
Sample Testcases
countEvens([2, 1, 2, 3, 4]) → 3
countEvens([2, 2, 0]) → 3
countEvens([1, 3, 5]) → 0
--------------------------------------------------------------------------------
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 16/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
The above mentioned example is a sample test case for your understanding. The program will be
tested on other secret test cases in the backend.Output format should be maintained to be scored
properly.Output format should be maintained to be scored properly Make sure you click
the SUBMIT button to save and submit your answer.
1 import java.util.Scanner;
2 public class Main 10 /10
3 {
4 public static int countEvens(int[] nums){
5 int result;
6 //WRITE YOUR CODE HERE
7 result = 0;
8 for (int i = 0; i < nums.length; i++) {
9 if (nums[i] % 2 == 0) {
10 result++;
11 }
12 }
13 return result;
14 }
15 public static void main(String[] args)
16 {
17 int n;
18 Scanner sc=new Scanner(System.in);
19 n=sc.nextInt();
20 int[] array = new int[n];
21 for(int i=0; i<n; i++)
22 {
23 array[i]=sc.nextInt();
24 }
25 int output=countEvens(array);
26 System.out.println(output);
27 }
28 }
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 17/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin
PROCTORING LOG
Sep 12, 2023 9:36:43 PM Candidate accepted the terms and started the assessment
Sep 12, 2023 9:35:41 PM Candidate Started the Spring Boot Section of the Assessment.
Sep 12, 2023 9:48:11 PM Candidate Completed the Spring Boot Section of the Assessment.
Sep 12, 2023 9:48:25 PM Candidate Started the General Java Section of the Assessment.
Sep 12, 2023 9:56:31 PM Candidate Completed the General Java Section of the Assessment.
Sep 12, 2023 9:56:36 PM Candidate Started the Microservice Section of the Assessment.
Sep 12, 2023 9:57:46 PM Candidate Completed the Microservice Section of the Assessment.
Sep 12, 2023 9:58:24 PM Candidate Started the Coding Exercises Section of the Assessment.
Sep 12, 2023 10:10:12 PM Candidate Completed the Coding Exercises Section of the Assessment.
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 19/19