Week 5 : Programming Assignment 1
Due on 2022-03-03, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below:
• at LINE-1 with appropriate initialization list to initialize the data members,
• at LINE-2 to call printContact(),
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 23 234529
Rajiv Delhi | roll: 23\n
name: Rajiv\n
phone: 234529\n
address: Delhi\n
| roll: 23\n
name: Rajiv\n
phone: 234529\n
address: Delhi\n
| Passed |
Test Case 2 | 54 239990
Komal Mumbai | roll: 54\n
name: Komal\n
phone: 239990\n
address: Mumbai\n
| roll: 54\n
name: Komal\n
phone: 239990\n
address: Mumbai\n
| Passed |
Week 5 : Programming Assignment 2
Due on 2022-03-03, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below:
• at LINE-1 and LINE-3 with appropriate inheritance statement,
• at LINE-2 and LINE-4 with appropriate initialization lists,
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 2 4 4 6 20000 | no_of_wheels: 2\n
no_of_wheels: 4, no_of_passengers: 4\n
no_of_wheels: 6, load_capacity: 20000\n
| no_of_wheels: 2\n
no_of_wheels: 4, no_of_passengers: 4\n
no_of_wheels: 6, load_capacity: 20000\n
| Passed |
Test Case 2 | 3 4 6 8 50000 | no_of_wheels: 3\n
no_of_wheels: 4, no_of_passengers: 6\n
no_of_wheels: 8, load_capacity: 50000\n
| no_of_wheels: 3\n
no_of_wheels: 4, no_of_passengers: 6\n
no_of_wheels: 8, load_capacity: 50000\n
| Passed |
Week 5 : Programming Assignment 3
Due on 2022-03-03, 23:59 IST
Consider the following program. Fill in the blanks as per the instructions given below:
• at LINE-1, LINE-2 and LINE-3 with initialization list,
• at LINE-4, LINE-5 and LINE-6 with function definitions,
such that it will satisfy the given test cases.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 10 20 30 | 10, 30, 60 | 10, 30, 60 | Passed |
Test Case 2 | 10 -10 10 | 10, 0, 10 | 10, 0, 10 | Passed |
No comments