Week 2 : Programming Assignment 1
Due on 2023-08-10, 23:59 IST
Complete the code segment to call the method print() of class Student first and then call print() method of class School.
NOTE: Don't provide any INPUT in Sample Test Cases
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | NA | Hi! I am class STUDENT\n
Hi! I class SCHOOL. | Hi! I am class STUDENT\n
Hi! I class SCHOOL.\n
| Passed after ignoring Presentation Error |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Week 2 : Programming Assignment 2
Due on 2023-08-10, 23:59 IST
Complete the code segment to call the method print() of class given class Printer to print the following.
--------------------------------
Hi! I am class STUDENT
Hi! I class SCHOOL.
--------------------------------
--------------------------------
NOTE: Don't provide any INPUT in Sample Test Cases
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | NA | Hi! I am class STUDENT\n
Hi! I class SCHOOL. | Hi! I am class STUDENT\n
Hi! I class SCHOOL.\n
| Passed after ignoring Presentation Error |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Week 2 : Programming Assignment 3
Due on 2023-08-10, 23:59 IST
Complete the code segment to call print() method of class Question by creating a method named ‘studentMethod()’.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | NA | Well Done! | Well Done! | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Week 2 : Programming Assignment 4
Due on 2023-08-10, 23:59 IST
Complete the code segment to call default constructor first and then any other constructor in the class.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | NA | You got nothing.\n
You got 10 for an MCQ | You got nothing.\n
You got 10 for an MCQ | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Week 2 : Programming Assignment 5
Due on 2023-08-10, 23:59 IST
Complete the code segment to debug / complete the program which is intended to print 'NPTEL JAVA'.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | NA | NPTEL JAVA | NPTEL JAVA | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
---------------------------------------------------------------------------
Week 3 : Programming Assignment 1
Due on 2023-08-17, 23:59 IST
This program is related to the generation of Fibonacci numbers.
For example: 0,1, 1,2, 3,5, 8, 13,… is a Fibonacci sequence where 13 is the 8th Fibonacci number.
A partial code is given and you have to complete the code as per the instruction given .
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 8 | 13 | 13\n
| Passed after ignoring Presentation Error |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Test Case 2 | Passed |
Test Case 3 | Passed |
Week 3 : Programming Assignment 2
Due on 2023-08-17, 23:59 IST
Define a class Point with two fields x and y each of type double. Also, define a method distance(Point p1, Point p2) to calculate the distance between points p1 and p2 and return the value in double.
Complete the code segment given below. Use Math.sqrt( ) to calculate the square root.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 2.0 3.0
1.0 2.0 | 1.4142135623730951 | 1.4142135623730951 | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Week 3 : Programming Assignment 3
Due on 2023-08-17, 23:59 IST
A class Shape is defined with two overloading constructors in it. Another class Test1 is partially defined which inherits the class Shape. The class Test1 should include two overloading constructors as appropriate for some object instantiation shown in main() method. You should define the constructors using the super class constructors. Also, override the method calculate( ) in Test1 to calculate the volume of a Shape.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 2.0 3.0 4.0 | 16.0\n
24.0 | 16.0\n
24.0\n
| Passed after ignoring Presentation Error |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Week 3 : Programming Assignment 4
Due on 2023-08-17, 23:59 IST
This program to exercise the call of static and non-static methods. A partial code is given defining two methods, namely sum( ) and multiply ( ). You have to call these methods to find the sum and product of two numbers. Complete the code segment as instructed.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 3 5 | 8\n
15 | 8\n
15 | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Week 3 : Programming Assignment 5
Due on 2023-08-17, 23:59 IST
Complete the code segment to swap two numbers using call by object reference.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 10 20 | 20 10 | 20 10\n
| Passed after ignoring Presentation Error |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
No comments