Quiz Space

Modern Application Development II Quiz 1: 13 July 2025 (May 2025 term)

Question 1

+2 marksOne correct option

In Vue 2, what happens when you update a data property?

  1. A

    DOM is immediately updated without virtual DOM

  2. B

    The page reloads

  3. C

    The virtual DOM detects changes and updates efficiently

  4. D

    A full component re-renders from scratch

Question 2

+2 marksOne correct option

Consider the following HTML, with the correct Vue 2 CDN links included:

Html code.

html
<div id="app">
<h3>Shopping Cart</h3>
<p>Items: {{itemCount}}</p>
<p>Total Cost: ${{totalCost}}</p>
<button @click="addItem">Add Item ($15)</button>
<button @click="removeItem">Remove Item</button>
<p>Status: {{status}}</p>
</div>

script:

javascript
const app = new Vue({
el: '#app',
data() {
return {
itemCount: 0,
itemPrice: 15,
totalCost: 0
}
},
computed: {
status() {
if (this.itemCount === 0) {
return 'Empty Cart';
} else if (this.itemCount < 3) {
return 'Few Items';
} else {
return 'Full Cart';
}
}
},
methods: {
addItem() {
this.itemCount++;
this.totalCost += this.itemPrice;
},
removeItem() {
if (this.itemCount > 0) {
this.itemCount--;
this.totalCost -= this.itemPrice;
}
}
}
})

If the user clicks the "Add Item" button 3 times, then clicks the "Remove Item" button 1 time, what will be displayed for Items, Total Cost, and Status?

  1. A

    Items: 2, Total Cost: $30, Status: Few Items

  2. B

    Items: 2, Total Cost: $45, Status: Few Items

  3. C

    Items: 3, Total Cost: $30, Status: Full Cart

  4. D

    Items: 2, Total Cost: $30, Status: Full Cart

  5. E

    Items: 1, Total Cost: $15, Status: Few Items

Question 3

+2 marksOne correct option

Consider the following code.

javascript
const arr = [1, 2, 3];
const result = arr.map(function(item, index) {
return this[index] * item;
}, [10, 20, 30]);
console.log(result);

What will be the output?

  1. A

    [1, 2, 3]

  2. B

    [10, 40, 90]

  3. C

    [10, 20, 30]

  4. D

    [NaN, NaN, NaN]

13 more questions in this paper

Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.

More on the MAD 2 Quiz 1 13 Jul 2025 paper

The IIT Madras BS Modern Application Development II (MAD 2) Quiz 1 paper sat on 13 Jul 2025, in the May 2025 term: 16 questions for 50 marks in 120 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.

FeatureMAD 2 Quiz 1 13 Jul 2025 at a glance
TermMay 2025 term
SubjectModern Application Development II
Course codeBSCS2006
Questions16
Marks50
Duration120 min
MCQ15
MSQ1
Official paperIIT M DIPLOMA AN EXAM QDD2 13 July 2025
Negative markingNo negative marking.
Updated

Same Quiz 1, other subjects

More MAD 2