1. Create a Console-Based CRUD Application Using Java, Apache Derby, and NetBeans
Scenario:
You are tasked with developing a console-based application in Java using Apache Derby as
the database and NetBeans IDE for development. This application will allow the user to
perform CRUD (Create, Read, Update, Delete) operations on a list of students. The
application should also be able to retrieve and display all male and female students
separately.
Application Requirements:
1.
2.
Student Class:
• Create a Student class that has the following attributes:
â– studentNo (Integer, Primary Key)
â– name (String)
age (Integer)
â– gender (String, 'Male' or 'Female')
Database Setup:
Use Apache Derby as the database.
3.
Application Functionality:
• Implement a menu-driven interface in the console that allows users to perform the
following operations:
1. Add a Student:
â– The user should be able to enter student details (name, age, gender) and
save the data to the database.
2. View All Students:
â– Display a list of all students currently in the database.
3. Update Student Details:
â– The user should be able to update the name, age, and gender of a student by
specifying their id.
4. Delete a Student:
â– The user should be able to delete a student from the database by specifying
their id.
5. View All Males:
â– Display a list of all male students in the database.
6. View All Females:
â– Display a list of all female students in the database.
7. Exit:
â– Exit the application.
Submit PDF, Word or Images
* (70 Points)
Upload file
File number limit: 10 Single file size limit: 100MB Allowed file types: Word, PDF, Image
2. What is the correct way to create a thread in Java?* (2 Points)
A) Extend the Thread class and override the run() method
B) Implement the Runnable interface and override the start() method
C) Implement the Runnable interface and override the run() method
D) Both A and C