You are on page 1of 19

9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin

Report Generated on: 9/13/2023, 1:23:18 PM

Gino Tamaca
ginosjtamaca@gmail.com
Submitted On: Sep 12, 2023, 2:10:42 PM
From: Calamba, Calabarzon - Philippines
IP: 136.158.78.109

Java Spring Boot Skill Assessment 90.12% 73/81


Qualified Overall % Score

Summary

SKILL(S) Percentage Score acheived

Spring Boot 61.90% 13/21

General Java 100.00% 16/16

Microservice 100.00% 4/4

Coding Exercises 100.00% 40/40

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

Section 1: Spring Boot

12
61.90% 13/21 min(s)
30
sec(s)

Percentage Score Time Taken

Quick Access

1 2 3 4 5 6 7 8 9 10 11 12

Q: 1

Which of these annotations can be used to auto-configure Spring Boot applications?


A. @Configuration
B. @SpringBootApplication
C. @EnableAutoConfiguration
D. @EnableComponentScan

Multiple Choice Question 1 Point Easy

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 ?

Multiple Choice Question 1 Point Easy

Answer by candidate: ​@EnableAutoConfiguration


Answer Status: Correct

1 /1

Q: 3

_ _ _ _ _ _ _ _ _ _ _ _ enables production-ready feature to the spring boot application.

Multiple Choice Question 1 Point Easy

Answer by candidate: ​Actuators


Answer Status: Correct
https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 2/19
9/13/23, 1:23 PM Gino Tamaca | Java Spring Boot Skill Assessment | Xobin

1 /1

Q: 4

Consider the below Spring-boot based code segment:


@Bean
public PrivacyChain demoChain(ServerHttpSecurity http) {
return http.httpBasic().and()
.authorizeExchange()
.pathMatchers(____________).permitAll()
.and()
.build();
}

Which code snippet must fill the blank such that Actuator security rules are present and all
endpoints fetch for actuator?

Multiple Choice Question 2 Points Medium

Answer by candidate: "/actuator/**"

Answer Status: Correct

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"
}
}
}

The status of this code would be fetched by which of the endpoint:

Multiple Choice Question 2 Points Medium

Answer by candidate: https://localhost:4000/actuator

Answer Status: Not Correct

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

What can be the output on the browser?

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

Multiple Choice Question 2 Points Medium

Answer by candidate: {
"name":"system.cpu.usage",
"measurements":[
{
"statistic":"Data",
"value":1234
}
],
"availableTags":[

]
}

Answer Status: Correct

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?

Multiple Choice Question 2 Points Medium

Answer by candidate: Initialize application


Answer Status: Correct

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" : "sample@sample.com",
"_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?

Multiple Choice Question 2 Points Medium

Answer by candidate: http://localhost:4000/users?role=123

Answer Status: Not Correct

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:

Multiple Choice Question 2 Points Medium

Answer by candidate: @EnableAutoConfiguration


@EnableDiscoveryClient
@Import(RecordsWebApplication.class)
public class RecordsServer {
@Autowired
RecordRepository RecordRepository;
public static void main(String[] args) {
SpringApplication.run(RecordsServer.class, args);
}
}

Answer Status: Correct

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 }

Which line of code would explicitly requests the load-balanced template?

Multiple Choice Question 2 Points Medium

Answer by candidate: Line 6


Answer Status: Not Correct

0 /2

Q: 11

Which of the following code segment can be used in Spring Boot for unit testing of the class named
"Member"?

Multiple Choice Question 2 Points Medium

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

Answer by candidate: @Before


public void setUp() {
Member m1 = new Member("m1");
Mockito.when(member.findByName(m1.getName()))
.thenReturn(m1);
}

Answer Status: Correct

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
}

For testing MVC controller's, which of the following would be true?

Multiple Choice Question 2 Points Medium

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

Section 2: General Java

8
100.00% 16/16 min(s)
6
sec(s)

Percentage Score Time Taken

Quick Access

1 2 3 4 5 6 7 8 9 10

Q: 1

Declare and print a long data type in Java.

Multiple Choice Question 1 Point Easy

Answer by candidate: public class Xobin{


public static void main(String[] args) {
long a = 2000000000L;
System.out.println(a);
}
}

Answer Status: Correct

1 /1

Q: 2

Choose the right difference between ArrayList and LinkedList in Java.

Multiple Choice Question 1 Point Easy

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.

Multiple Choice Question 1 Point Easy

Answer by candidate: None of the above.


Answer Status: Correct

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?

Multiple Choice Question 2 Points Medium

Answer by candidate: class C1 {


........
........
}
class C2 extends C1 {
........
........
}

Answer Status: Correct

2 /2

Q: 5

class Student
{
private int marks;
private Students()
{
marks = 45;
}
}

public class Test


{
public static void main(String[] args)
{
Test st = new Student();
System.out.println(st.marks);
}
}

Rewrite the above Java code to get the output as 45.

Multiple Choice Question 3 Points Hard

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

Answer by candidate: class Student


{
int marks;
public void Students()
{
marks = 45;
System.out.println(marks);
}
} Q: 6

What will be the output ofpublic


{
the following
class Test
Java code?
public class Main public static void main(String[] args)
{ {
Student st args[])
public static void main(String = new Student();
{ st.Students();
int value = 10; }
if (value == } 10)
{
Answer Status: int value =Correct
20;

}
System.out.println(value);

System.out.println(value);
3 /3

}
}

Multiple Choice Question 3 Points Hard

Answer by candidate: Compilation error


Answer Status: Correct

3 /3

Q: 7

Which type of inheritance is shown in the Java code below?


class Trees{
void leaves(){
System.out.println("Leaves are green");
}
}
class MangoTree extends Trees {
void fruit(){
System.out.println("Fruit is yellow");
}
}
class TestInheritance {
public static void main(String args[]) {
Trees d = new MangoTree();
d.fruit();
d.leaves();
}
}

Multiple Choice Question 2 Points Medium

Answer by candidate: Single Inheritance


Answer Status: Correct

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

What is an abstraction in object-oriented programming?

Multiple Choice Question 1 Point Easy

Answer by candidate: Hiding the implementation and showing only the features.
Answer Status: Correct

1 /1

Q: 9

What happens when an object is passed by reference?

Multiple Choice Question 1 Point Easy

Answer by candidate: Destructor is not called.


Answer Status: Correct

1 /1

Q: 10

Which OOP feature reduces the use of nested classes?

Multiple Choice Question 1 Point Easy

Answer by candidate: Inheritance


Answer Status: Correct

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)

Percentage Score Time Taken

Quick Access

1 2 3

Q: 1

Which among the listed below is a problem that could be resolved with microservices?

Multiple Choice Question 1 Point Easy

Answer by candidate: Difficulty maintaining API signatures.


Answer Status: Correct

1 /1

Q: 2

Which among the given below options is correct about both SOA and microservices?

Multiple Choice Question 2 Points Medium

Answer by candidate: They both require careful planning of where they will be useful and most effective.
Answer Status: Correct

2 /2

Q: 3

Why would a microservices architecture be beneficial?

Multiple Choice Question 1 Point Easy

Answer by candidate: All of the above.


Answer Status: Correct

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

Section 4: Coding Exercises

11
100.00% 40/40 min(s)
46
sec(s)

Percentage Score Time Taken

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.

Note: The column title must be given in capital letters only.


Sample Input :
AA
Sample Output:
27
Sample Input :
MNO
Sample Output :
9167

--------------------------------------------------------------------------------
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

Coding 10 Points Easy Language: Java

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 }

Name Input Expected Output Received Output Status

Test Case 0 AA 27 27 Passed

Test Case 1 CDA 2133 2133 Passed

Test Case 2 ABC 731 731 Passed

Test Case 3 QRS 11979 11979 Passed

Test Case 4 XYZ 16900 16900 Passed

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.

Coding 10 Points Easy Language: Java

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

Name Input Expected Output Received Output Status

Test Case 0 10 126 126 Passed

Test Case 1 25 1 2 6 24 1 2 6 24 Passed

Test Case 2 200 1 2 6 24 120 1 2 6 24 120 Passed

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.

Coding 10 Points Easy Language: Java

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

8 if (input_from_question != null && !input_from_question.isEmpty()) {


9
10 if (Character.isUpperCase(input_from_question.charAt(0))) {
11 input_from_question = input_from_question.toUpperCase();
12 } else {
13 input_from_question = input_from_question.toLowerCase();
14 }
15 } else {
16 input_from_question = "";
17 }
18 System.out.println(input_from_question);
19 }
20 }

Name Input Expected Output Received Output Status

Test Case 0 boOTcamP bootcamp bootcamp Passed

Test Case 1 Amir AMIR AMIR Passed

Test Case 2 waTER water water Passed

Test Case 3 ApPle APPLE APPLE Passed

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.

Coding 10 Points Easy Language: Java

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 }

Name Input Expected Output Received Output Status

Test Case 0 521234 3 3 Passed

Test Case 1 3220 3 3 Passed

Test Case 2 3135 0 0 Passed

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:35:41 PM Candidate switched to question 1.

Sep 12, 2023 9:36:03 PM Candidate switched to question 2.

Sep 12, 2023 9:36:37 PM Candidate switched to question 3.

Sep 12, 2023 9:37:11 PM Candidate switched to question 4.

Sep 12, 2023 9:37:25 PM Candidate switched to question 5.

Sep 12, 2023 9:38:43 PM Candidate switched to question 6.

Sep 12, 2023 9:40:08 PM Candidate switched to question 7.

Sep 12, 2023 9:41:09 PM Candidate switched to question 8.

Sep 12, 2023 9:41:46 PM Candidate switched to question 9.

Sep 12, 2023 9:42:27 PM Candidate switched to question 10.

Sep 12, 2023 9:44:35 PM Candidate switched to question 11.

Sep 12, 2023 9:45:01 PM Candidate switched to question 12.

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:48:25 PM Candidate switched to question 1.

Sep 12, 2023 9:49:28 PM Candidate switched to question 2.

Sep 12, 2023 9:50:34 PM Candidate switched to question 3.

Sep 12, 2023 9:51:45 PM Candidate switched to question 4.

Sep 12, 2023 9:52:17 PM Candidate switched to question 5.

Sep 12, 2023 9:53:19 PM Candidate switched to question 6.

Sep 12, 2023 9:53:46 PM Candidate switched to question 7.

Sep 12, 2023 9:54:25 PM Candidate switched to question 8.

Sep 12, 2023 9:54:44 PM Candidate switched to question 9.

Sep 12, 2023 9:55:45 PM Candidate switched to question 10.

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:56:36 PM Candidate switched to question 1.

Sep 12, 2023 9:56:52 PM Candidate switched to question 2.

Sep 12, 2023 9:57:15 PM Candidate switched to question 3.

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 9:58:24 PM Candidate switched to question 1.

Sep 12, 2023 10:00:03 PM Candidate switched to question 2.

Sep 12, 2023 10:01:36 PM Candidate switched to question 3.


https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 18/19
Sep 12, 2023 10:01:36 PM
9/13/23, 1:23 PM
Candidate switched to question 3.
Gino Tamaca | Java Spring Boot Skill Assessment | Xobin

Sep 12, 2023 10:05:09 PM Candidate switched to question 4.

Sep 12, 2023 10:10:12 PM Candidate Completed the Coding Exercises Section of the Assessment.

Sep 12, 2023 10:10:12 PM Candidate has submitted the assessment.

https://slash.xobin.com/assessments/reports?assessment=26280&candidate=1576679 19/19

You might also like