Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Test13Apr24

Total questions: 60

Worksheet time: 3600secs

Name
Class
Date
1.

What does the term "bounded context" mean in relation to microservices?

a)

How a microservice uses memory

b)

The logical domain represented by the data consumed and emitted by a microservice according to the data's purpose, structure and meaning

c)

The cloud provider's region where the microservice operates

d)

The common characteristics within a collection of entities in one or many business domains

2.

How is distributed tracing used in microservices?

a)

As a mechanism to ensure that failed microservices are resurrected properly

b)

As a mechanism to transfer log management between a given host on demand

c)

As a mechanism to observe the behavior of distinct system calls between and within microservices

d)

As a mechanism to change the behavior of a microservice at runtime

3.

When you have ample time and budget, which will be your choice of architecture

for application development?

a)

Microservices

b)

Monolith

c)

Either of these two

d)

None of the above

4.

How does a backing service apply to microservices?

a)

It prevents a microservice from failing

b)

It acts as a dedicated service that provides essential functionality required by a microservice

c)

It shuts down a microservice when it can no longer handle the computing load

d)

It coordinates network activity between microservices

5.

Q4 What's the difference between a microservices-oriented architecture (MOA) and a service-oriented architecture (SOA)?

a)

An SOA uses intermediation technology to facilitate communication between services

b)

An MOA shares as little data as possible while an SOA shares as much data as possible

c)

A developer can run a monolithic application with SOA principles

d)

All the above

6.

Which Architecure allows use of mutiple programming lanuages in development process.

a)

Microservices

b)

Both actually

c)

None

d)

Anyone can have

7.

Which among the choices are NOT included in definition of the good software development practice.

a)

Health checks and Metrics

b)

Metrics and Tracing

c)

Tracing and logs

d)

All of the above

8.

Which of the following query is correct to get Current Date from Query?

A. SELECT DATE ( NOW() ) as today;

B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;

a)

A. SELECT DATE ( NOW() ) as today;

b)

B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;

c)

Both A and B

d)

None

9.

Write a query to display first_name and last_name of all employees who have their first_name starting with 'A'.

a)

Select first_name from employess where first_name LIKE '%A';

b)

Select first_name from employess where first_name LIKE "'A'%";

c)

Select first_name from employess where first_name LIKE 'A%';

d)

Select first_name from employess where first_name LIKE '%A%';

10.

A relational database can have how many types of keys in a table ?

a)

Candidate key

b)

Primary key

c)

Foreign key

d)

All of these

11.

Total number of rows/records/horizontal arrangement in a table is called:

a)

Degree

b)

Records

c)

Integer

d)

Cardinality

12.

Which is the correct query to delete the rows of employees whose exp is less than 10.

a)

DELETE * FROM EMP WHERE EXP<10;

b)

DELETE FROM EMP;

c)

DELETE FROM EMP WHERE EXP<10;

d)

DELETE FROM EMP WHERE EXP>10;

13.

Difference between ALTER Table command and UPDATE command :

a)

ALTER is DDL command and is used for modifying the schema of table

b)

UPDATE is DML command and is

used for modifying the existing data of table

c)

Using Alter command any value inside the table can be modified.

d)

Using Update command columns of a table can be renamed.

14.

You are required to update the phone number for only the DesignerID "SMI01" in the "Designer" table. Which of these would successfully do that?

a)

UPDATE Designer SET PhoneNo = '01224123456'

b)

UPDATE Designer (PhoneNo) VALUES ('01224123456')

c)

UPDATE Designer SET PhoneNo = '01224123456' WHERE DesignerID = 'SMI01'

d)

UPDATE PhoneNo = '01224123456' FROM Designer WHERE DesignerID = 'SMI01'

15.
a)
SELECT * FROM movies WHERE genre = 'romance' AND imdb_rating > 7.5 ORDER BY year DESC LIMIT 4;
b)
SELECT * FROM movies WHERE genre = 'romance' AND imdb_rating > 7.5 ORDER BY year ASC LIMIT 4;
c)
SELECT * FROM movies WHERE genre = romance AND imdb_rating > 7.5 ORDER BY year DESC LIMIT 4;
d)
SELECT * FROM movies WHERE genre = 'romance' AND imdb_rating < 7.5 ORDER BY year DESC LIMIT 4;
16.

What is MongoDB and how is it different from traditional SQL databases?

a)

MongoDB is a traditional SQL database with a fixed schema and limited scalability

b)

MongoDB is a programming language used for web development and is not related to databases at all

c)

MongoDB is a NoSQL database that stores data in a flexible, JSON-like format. It is different from traditional SQL databases in that it does not use a fixed schema and is designed for horizontal scalability.

d)

MongoDB is a type of data storage that only works with structured data and does not support JSON format

17.

Explain the purpose of MongoDB Compass.

a)

To provide a platform for creating and managing SQL databases

b)

To offer a command-line interface for MongoDB

c)

To generate reports and analytics for NoSQL databases

d)

To provide a graphical user interface for MongoDB, allowing users to explore and manipulate data.

18.

What are CRUD operations in MongoDB and how are they performed?

a)

Create, Read, Update, and Delete operations are performed using specific methods and commands provided by MongoDB.

b)

Create, Retrieve, Update, Destroy operations are performed using SQL commands

c)

Add, Search, Modify, Erase operations are performed using Firebase commands

d)

Copy, Remove, Update, Drop operations are performed using NoSQL methods

19.

What are the advantages of using NoSQL databases over traditional SQL databases?

a)

NoSQL databases have no advantages over traditional SQL databases.

b)

NoSQL databases offer advantages such as scalability, flexibility, and better performance for certain types of applications.

c)

NoSQL databases are not suitable for any type of application.

d)

NoSQL databases offer disadvantages such as limited scalability, inflexibility, and worse performance for certain types of applications.

20.

Wich method is for writing data into mongoDB?

a)

insertOne()

b)

setDoc()

c)

addDoc()

d)

postOne()

21.

Wich method is for getting all data from mongoDB?

a)

getDoc()

b)

findOne()

c)

find()

d)

findDoc()

22.

What will be the output of the following Python code?

>>>str1="helloworld"

>>>str1[::-1]

a)

a) dlrowolleh

b)

b) hello

c)

c) world

d)

d) helloworld

23.

If a=(1,2,3,4), a[1:-1] is _________

a)

a) Error, tuple slicing doesn’t exist

b)

b) [2,3]

c)

c) (2,3,4)

d)

d) (2,3)

24.

What will be the output of the following Python code?

a={1:"A",2:"B",3:"C"}

b={4:"D",5:"E"}

a.update(b)

print(a)

a)

a) {1: ‘A’, 2: ‘B’, 3: ‘C’}

b)

b) Method update() doesn’t exist for dictionaries

c)

c) {1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’, 5: ‘E’}

d)

d) {4: ‘D’, 5: ‘E’}

25.

times is ________________ type of argument.

a)

default arguments

b)

keyword arguments

c)

positional arguments

d)

arbitrary positional arguments

e)

arbitrary keyword arguments

26.

What is an instance in python?

a)

A special kind of function that is defined in a class definition.

b)

The creation of an instance of a class.

c)

An individual object of a certain class. An object obj that belongs to a class Circle, for example, is an instance of the class Circle.

d)

A moment in time

27.
What will print?
a)
nothing
b)
7
c)
z
d)
12
28.

What will be the output of the following Python code?

>>> lamb = lambda x: x ** 3

>>> print(lamb(5))

a)

15

b)

555

c)

125

d)

Error

29.

What is the output of the expression :

print(3*1**3)

a)

27

b)

9

c)

3

d)

1

30.

Which of the following classes extends HashMap and maintains the insertion order of the elements?

a)

TreeMap

b)

LinkedHashMap

c)

SortedMap

d)

None of the above

31.

Which interface provides the capability to store

objects using a key-value pair?

a)

List

b)

Set

c)

Map

d)

SortedSet

32.

Which of these statements are true?

Statement A : Collection is a Interface

Statement B : Collections is a class

a)

Statement A is true

b)

Statement B is true

c)

Both Statements are true

d)

Both Statements are false

33.

Which of the following code is used to get a HttpSession object in Servlet?

a)

request.getSession()

b)

response.getSession()

c)

request.session()

d)

response.session()

34.

1. Which of the following is not a core interface of Hibernate?

a)

a) Configuration

b)

b) Criteria

c)

c) SessionManagement

d)

d) Session

35.

2. Which of the following methods hits database always?

a)

a) load()

b)

b) loadDatabase()

c)

c) getDatabase()

d)

d) get()

36.

Hibernate is an?

a)

Open Source

b)

Lightweight

c)

ORM

d)

All mentioned above

37.

Which of the following object is used to create SessionFactory object in hibernate?

a)

SessionFactory

b)

Transaction

c)

Configuration

d)

Session

38.

Which of the following is true about hibernate annotations?

a)

All the metadata is clubbed into the POJO java file along with the code this helps the user to understand the table structure and POJO simultaneously during the development

b)

Hibernate Annotations is the powerful way to provide the metadata for the Object and Relational Table mapping

c)

Both of the above

d)

None of the above

39.

In the elements of Hibernate architecture is a factory of session and client of ConnectionProvider, It holds the second level cache (optional) of data is ?

a)

Session

b)

Transaction

c)

SessionFactory

d)

ConnectionProvider

40.

It is an open source Java-based framework used to create stand-alone, production-grade Spring based Applications that you can "just run"

a)

Spring Data

b)

Spring JPA

c)

Spring Boot

d)

Spring MVC

41.

it contains information of configuration for the maven to build the project such as dependencies, build directory, source directory, test source directory, plugin etc.

a)

maven wrapper configuration

b)

application.properties

c)

pom.xml file

d)

application.xml

42.
Which are the IoC containers in Spring?
a)
BeanFactory, ApplicationContext
b)
BeanFactory, ApplicationContext, IocContextFactory
c)
BeanFactory, BeanContext, IocContextFactory
d)
BeanFactory, ApplicationContext, BeanContext
43.

What is the Annotation used for Rest controller

a)

@Restcontroller

b)

@Controller

c)

@RestController

d)

@SpringBootApplication

44.

What is default HTML template engine in spring boot

a)

JSP

b)

Thymeleaf

c)

HTML

45.

@Autowired can be used for

a)

Include a Repository in a Controller

b)

Include a Service in a Controller

c)

Include a Component in a Controller

d)

All the Above

46.

Which of the Following are true?

a)

Methods annotated with @RestController return a String or JSON object

b)

Methods annotated with @Controller returns HTML filename

c)

Methods annotated with @RestController automatically converts Outputs with HTML

d)

All the Above

47.
How to integrate all microservices in Spring Boot?
a)
Add Actuator, Eureka Discovery, JPA, and Rest Repositories dependencies.
b)
Add Actuator, Eureka Discovery, JPA, H2, Rest Repositories, and Web dependencies.
c)
Add Actuator, JPA, H2, and Rest Repositories dependencies.
d)
Add Eureka Discovery, JPA, H2, Rest Repositories, and Web dependencies.
48.
Are microservices SOAP or REST?
a)
Microservices are based on SOAP.
b)
Microservices are based on REST.
c)
Microservices can use both SOAP and REST interchangeably.
d)
Microservices do not use any API protocols.
49.

JavaScript Code can be called by using _________.

a)

RMI

b)

Function / Method

c)

Triggering Event

d)

Preprocessor

50.

What is the output of the following script?


function display() { document.writeln(10+20+"30"); } display();

a)

60

b)

30"30"

c)

3030

d)

102030

51.

Choose the correct JavaScript syntax to change the content of the following HTML code.

<p id="geek">GeeksforGeeks</p>

a)

document.getElement(“geek”).innerHTML=”I am a Geek”;

b)

document.getElementById(“geek”).innerHTML=”I am a Geek”;

c)

document.getId(“geek”)=”I am a Geek”;

d)

document.getElementById(“geek”).innerHTML=I am a Geek;

52.

<script type="text/javascript" language="javascript">

var x=5;

var y=6;

var res=eval("x*y");

document.write(res);

</script>

a)

“30”

b)

30

c)

5*6

d)

“5*6”

53.

What is the role of services in AngularJS and name any services made available by default?

a)

AngularJS Services are objects that provide separation of concerns to an AngularJS app.

b)

These can be created using a factory method or a service method.

c)

Services are singleton components and all components of the application (into which the service is injected) will work with single instance of the service

d)

all of the above

54.

Which of the following is true about ng-include directive?

a)

Embed HTML pages within a HTML page using ng-include directive

b)

Embed JS files within a HTML page using ng-include directive

c)

Both of the above.

d)

None of the above.

55.

Which of the following query is correct to get Current Date from Query?

A. SELECT DATE ( NOW() ) as today;

B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;

a)

A. SELECT DATE ( NOW() ) as today;

b)

B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;

c)

Both A and B

d)

None

56.

Identify the incorrect difference between HTML and DHTML?

a)

HTML is a mark-up language, while DHTML is a collection of technology

b)

HTML sites will be fast upon client-side technologies, while DHTML sites will be slow enough upon client-side technologies.

c)

DHTML creates dynamic web pages, whereas HTML creates static web pages.

d)

HTML cannot have any server side code but DHTML may contain server side code.

e)

DHML is basically using JavaScript and style sheets in an HTML page.

57.

What is the purpose of a bundler in web development?

a)

To generate JSX

b)

To convert JSX and other resources into JavaScript

c)

To bootstrap an application

58.

If you need space above the div tag, what was the property to increase the margin-top? (Choose the correct syntax).

a)

margin-top: 20;

b)

marginTop: 20px;

c)

margin-top: 20px;

d)

Margin-Top: 20;

59.
How does API work in microservices?
a)
APIs enable microservices by providing communication between applications.
b)
APIs are not used in microservices architecture.
c)
APIs are used for documentation purposes in microservices.
d)
Microservices cannot utilize APIs for software development.
60.
Is Java suitable for microservices?
a)
No, Java is not suitable for microservices.
b)
Yes, Java is great for microservices. It provides functionality to work with complex systems.
c)
Java is suitable only for monolithic applications.
d)
Java is suitable only for front-end development.