Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT"DIPLOMA LEVEL : MODERN APPLICATION
DEVELOPMENT II (COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
DEVELOPMENT II (COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
Solution
Which of the following statements is true regarding the "this" keyword in JavaScript?
Solution
Consider the below JavaScript program.

What will be the output of the above program?
What will be the output of the above program?
Solution
What is the main advantage of using JWT over session-based authentication?
Solution
Which of the following HTTP methods does WebSocket use for initial handshake?
Solution
You are creating a cricket analytics app. The filebattingStats.jsexports:

Inapp.js, which import statement correctly imports both strikeRate and playerName? (Assume both js files are in the same folder.)
Inapp.js, which import statement correctly imports both strikeRate and playerName? (Assume both js files are in the same folder.)
Solution
A JWT is structured as"header.payload.signature". In Flask-JWT-Extended, what does the payloadsection contain?
Solution
Consider the below JavaScript program.

What will be the output of the above program?
What will be the output of the above program?
Solution
Consider the below Vuex store configuration:

If the addItemAsync action is dispatched with the item 'Vue', what will be the state of itemsafter 2 seconds?
If the addItemAsync action is dispatched with the item 'Vue', what will be the state of itemsafter 2 seconds?
Solution
Consider the below Vue app.

What happens when the user navigates to an undefined route like "/unknown"?
What happens when the user navigates to an undefined route like "/unknown"?
Solution
What will be the output of the following JavaScript code?

Solution
Consider the following JavaScript program:

What will be the output of the above program on a browser's console?
What will be the output of the above program on a browser's console?
Solution
Consider the following JavaScript program:

What will be the output of the above program?
What will be the output of the above program?
Solution
What happens when this Flask caching code runs?

If requests for IDs 1, 2, 1 are made within 3 minutes, what's the total response time?
If requests for IDs 1, 2, 1 are made within 3 minutes, what's the total response time?
Solution
Consider the following JavaScript program:

What will be printed in the console when the code runs?
What will be printed in the console when the code runs?
Solution
Match the Vue directive with its functionality:

Solution
In a Single Page Application (SPA), what are the benefits of client-side routing over server-side routing?
Solution
Which of the following is/are the correct statement?
Solution
Consider the following Vue application with markup index.html and JavaScript file app.js.
File: index.html

File: script.js

Suppose the application is running on http://127.0.0.1:8080. What will be rendered by the browser?
File: index.html
File: script.js
Suppose the application is running on http://127.0.0.1:8080. What will be rendered by the browser?
Solution
Consider the following endpoints created with a working setup of flask-security and flask- sqlalchemy.

Three requests are made to this application:
1.GET /api/free (no authentication headers)
2.GET /api/private (no authentication headers)
3.GET /api/adminonly with valid authentication token but user has role 'user' (not 'admin')
What will be the response status codes for these requests, respectively?
Three requests are made to this application:
1.GET /api/free (no authentication headers)
2.GET /api/private (no authentication headers)
3.GET /api/adminonly with valid authentication token but user has role 'user' (not 'admin')
What will be the response status codes for these requests, respectively?
Solution
Consider the following code snippet running in a browser.

What will be the output on the console?
What will be the output on the console?
Solution
Consider the following code snippet running on a browser.

What is the output on the console?
What is the output on the console?
Solution
A student is preparing travel gear and uses Vue 2 with Vuex to track packed items. The application below is incomplete:

Which of the following correctly fillsLine XandLine Yso the app works?
Which of the following correctly fillsLine XandLine Yso the app works?
Solution
Consider the flask applicationapp.pyand an HTML fileindex.html:
app.py:

index.html:

If a user visitsindex.htmlat10:10:10 AM, what will be logged in theconsole?
app.py:
index.html:
If a user visitsindex.htmlat10:10:10 AM, what will be logged in theconsole?
Solution
Consider the following Flask JWT code:

A request is made to/loginwith{ "username": "Jassi" }and then/profileis accessed. Which statements are correct?
A request is made to/loginwith{ "username": "Jassi" }and then/profileis accessed. Which statements are correct?
Solution
Riya uses Git and performs these steps:
- Creates a new branch and switches to it
- Stages changes for commit
- Commits the changes with a message
- Pushes the branch to remote
Which commands correctly match these operations?
- Creates a new branch and switches to it
- Stages changes for commit
- Commits the changes with a message
- Pushes the branch to remote
Which commands correctly match these operations?
Solution
Two students use a Vue.js app for course content.
- The sidebar appears immediately when the page loads
- The Assignments section takes a while to appear after clicking
The component is:

Which statement is/are explaining the delay?
- The sidebar appears immediately when the page loads
- The Assignments section takes a while to appear after clicking
The component is:
Which statement is/are explaining the delay?
Solution
Which of the following statement(s) is/are true about GraphQL?
Solution
Comprehension Passage
Consider the following Vue.js application:

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
How many times will"computed run"be logged during the initial render?
Solution
Comprehension Passage
Consider the following Vue.js application:

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
Ifcalculate()changes data like:

What happens when the button is clicked?
What happens when the button is clicked?
Solution
Comprehension Passage
Consider the following Vue.js application:

Based on the above data, answer the given subquestions.
Based on the above data, answer the given subquestions.
Why isbigValue()defined as a computed property instead of a method?
Solution
Comprehension Passage
Consider the following Vue 2 application:

Assume the Vue application is loaded at the urlhttp://127.0.0.1:5000/#/product/1. The user then clicks on theProduct 2router link.
Based on the above data, answer the given subquestions.
Assume the Vue application is loaded at the urlhttp://127.0.0.1:5000/#/product/1. The user then clicks on theProduct 2router link.
Based on the above data, answer the given subquestions.
What happens immediately after clicking"Product 2"?
Solution
Comprehension Passage
Consider the following Vue 2 application:

Assume the Vue application is loaded at the urlhttp://127.0.0.1:5000/#/product/1. The user then clicks on theProduct 2router link.
Based on the above data, answer the given subquestions.
Assume the Vue application is loaded at the urlhttp://127.0.0.1:5000/#/product/1. The user then clicks on theProduct 2router link.
Based on the above data, answer the given subquestions.
Why is theupdated()lifecycle hook triggered in this scenario?
Solution
Shape
Thickness [ / ]
3
All colors