Week 10 Programming Assignments 1
Due date on 2026-10-01, 23:59 IST
Complete Program
public class W10_P2 {
public static void main(String[] args) {
// --- START OF SOLUTION CODE ---
String url = "jdbc:sqlite:test.db";
// --- END OF SOLUTION CODE ---
// Portal test output
if (url.equals("jdbc:sqlite:test.db")) {
System.out.println("connection string ready");
} else {
System.out.println("incorrect connection string");
}
}
}
Code Snippet to Paste in the Editor
// --- START OF SOLUTION CODE ---
String url = "jdbc:sqlite:test.db";
// --- END OF SOLUTION CODE ---
This assignment has Public Test cases. Please click on "Compile & Run" button to see the status of Public test cases. Assignment will be evaluated only after submitting using Submit button below. If you only save as or compile and run the Program, your assignment will not be graded and you will not see your score after the deadline.
Evaluation Results
Note: These tests may not be considered while scoring.
Due date on 2026-10-01, 23:59 IST
Complete Program
public class W10_P2 {
public static void main(String[] args) {
// --- START OF SOLUTION CODE ---
String url = "jdbc:sqlite:test.db";
// --- END OF SOLUTION CODE ---
// Portal test output
if (url.equals("jdbc:sqlite:test.db")) {
System.out.println("connection string ready");
} else {
System.out.println("incorrect connection string");
}
}
}
Code Snippet to Paste in the Editor
// --- START OF SOLUTION CODE ---
String url = "jdbc:sqlite:test.db";
// --- END OF SOLUTION CODE ---
This assignment has Public Test cases. Please click on "Compile & Run" button to see the status of Public test cases. Assignment will be evaluated only after submitting using Submit button below. If you only save as or compile and run the Program, your assignment will not be graded and you will not see your score after the deadline.
Evaluation Results
Note: These tests may not be considered while scoring.
Due date on 2026-10-01, 23:59 IST
Complete Program
public class W10_P3 {
public static void main(String[] args) {
// --- START OF SOLUTION CODE ---
String sql = "INSERT INTO students (id, name) VALUES (1, 'Alice');";
// --- END OF SOLUTION CODE ---
// Portal test output
if (sql.equals("INSERT INTO students (id, name) VALUES (1, 'Alice');")) {
System.out.println("insert statement ready");
} else {
System.out.println("incorrect statement");
}
}
}
Code Snippet to Paste in the Editor
// --- START OF SOLUTION CODE ---
String sql = "INSERT INTO students (id, name) VALUES (1, 'Alice');";
// --- END OF SOLUTION CODE ---
This assignment has Public Test cases. Please click on "Compile & Run" button to see the status of Public test cases. Assignment will be evaluated only after submitting using Submit button below. If you only save as or compile and run the Program, your assignment will not be graded and you will not see your score after the deadline.
Evaluation Results
Note: These tests may not be considered while scoring.
Due date on 2026-10-01, 23:59 IST
Complete Program
public class W10_P4 {
public static void main(String[] args) {
// --- START OF SOLUTION CODE ---
String sql = "SELECT * FROM students;";
// --- END OF SOLUTION CODE ---
if (sql.equals("SELECT * FROM students;")) {
System.out.println("select statement ready");
} else {
System.out.println("incorrect statement");
}
}
}
Code Snippet to Paste in the Editor
// --- START OF SOLUTION CODE ---
String sql = "SELECT * FROM students;";
// --- END OF SOLUTION CODE ---
This assignment has Public Test cases. Please click on "Compile & Run" button to see the status of Public test cases. Assignment will be evaluated only after submitting using Submit button below. If you only save as or compile and run the Program, your assignment will not be graded and you will not see your score after the deadline.
Evaluation Results
Note: These tests may not be considered while scoring.
Due date on 2026-10-01, 23:59 IST
Complete Program
public class W10_P5 {
public static void main(String[] args) {
// --- START OF SOLUTION CODE ---
String sql = "UPDATE students SET name = 'Bob' WHERE id = 1;";
// --- END OF SOLUTION CODE ---
// Portal test output
if (sql.equals("UPDATE students SET name = 'Bob' WHERE id = 1;")) {
System.out.println("update statement ready");
} else {
System.out.println("incorrect statement");
}
}
}
Code Snippet to Paste in the Editor
// --- START OF SOLUTION CODE ---
String sql = "UPDATE students SET name = 'Bob' WHERE id = 1;";
// --- END OF SOLUTION CODE ---
This assignment has Public Test cases. Please click on "Compile & Run" button to see the status of Public test cases. Assignment will be evaluated only after submitting using Submit button below. If you only save as or compile and run the Program, your assignment will not be graded and you will not see your score after the deadline.
Evaluation Results
Note: These tests may not be considered while scoring.
No comments