Week 05 : Programming Assignment 1
Due on 2024-08-29, 23:59 IST
Write a program to create a method that takes an integer as a parameter and throws an exception if the number is odd.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | 7 | Error: 7 is odd. | Error: 7 is odd. | Passed |
Test Case 2 | 8 | 8 is even. | 8 is even. | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Week 05 : Programming Assignment 2
Due on 2024-08-29, 23:59 IST
Write a program to create an interface Searchable with a method search(String keyword) that searches for a given keyword in a text document.
Create two classes Document and WebPage that implement the Searchable interface and provide their own implementations of the search() method.
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | You are a hard working person.
student | Document contains keyword: student false\n
Webpage contains keyword 'webpage': true | Document contains keyword: student false\n
Webpage contains keyword 'webpage': true | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Week 05 : Programming Assignment 3
Due on 2024-08-29, 23:59 IST
Write a program to create a method that takes a string as input and throws an exception if the string does not contain vowels.
(Note: Check both upper and lower case vowels)
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | Fly by my crypt | Original string: Fly by my crypt\n
Error: String does not contain any vowels. | Original string: Fly by my crypt\n
Error: String does not contain any vowels. | Passed |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Week 05 : Programming Assignment 4
Due on 2024-08-29, 23:59 IST
Write a program to create an interface Flyable with a method called fly_obj().
Create three classes Spacecraft, Airplane, and Helicopter that implement the Flyable interface.
Implement the fly_obj() method for each of the three classes.
Create three classes Spacecraft, Airplane, and Helicopter that implement the Flyable interface.
Implement the fly_obj() method for each of the three classes.
(Remember to match the output given exactly, including the spaces and new lines)
(passed with presentation error means you will get full marks)
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | NA | Spacecraft is flying\n
Airplane is flying\n
Helicopter is flying | Spacecraft is flying\n
Airplane is flying\n
Helicopter is flying\n
| Passed after ignoring Presentation Error |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Week 05 : Programming Assignment 5
Due on 2024-08-29, 23:59 IST
Write a program to create an interface Playable with a method play() that takes no arguments and returns void.
Create three classes Football, Volleyball, and Basketball that implement the Playable interface and override the play() method to play the respective sports.
Create three classes Football, Volleyball, and Basketball that implement the Playable interface and override the play() method to play the respective sports.
(Remember to match the output given exactly, including the spaces and new lines)
(passed with presentation error means you will get full marks)
Public Test Cases | Input | Expected Output | Actual Output | Status |
---|---|---|---|---|
Test Case 1 | NA | Playing football\n
Playing volleyball\n
Playing basketball | Playing football\n
Playing volleyball\n
Playing basketball\n
| Passed after ignoring Presentation Error |
Private Test cases used for Evaluation | Status |
Test Case 1 | Passed |
Week 05 : Programming Assignment 1 2 3 4 5
netaji gandi
Tuesday, August 27, 2024