Question: Use the STUDENT schema: Students(SID, fName, lName, age); in the following program. Write and test a Java program that first creates a Students table using

Use the STUDENT schema: Students(SID, fName, lName, age); in the following program.

Write and test a Java program that first creates a Students table using SQLite (no other SQL Developer besides SQLite) if not exist and then performs the functions illustrated in the following terminal session:

Main Menu (1) Add a student (2) Drop a student (3) Find students by the first letter of the last name (4) Display all Students (5) Exit

Enter your choice: 1 SID = 10

First Name = Mary

Last Name = Rueda

Age = 20 Student Added.

Main Menu (1) Add a student (2) Drop a student (3) Find students by the first letter of the last name (4) Display all Students (5) Exit

Enter your choice: 1 SID = 10 SID should be unique. Enter another SID

SID = 30

First Name = Luis

Last Name = Rueda

Age = 30

Student Added.

Main Menu (1) Add a student (2) Drop a student (3) Find students by the first letter of the last name (4) Display all Students (5) Exit

Enter your choice: 1 SID = 20

First Name = Esi

Last name = Jedari

Age = 30 Student Added.

Main Menu (1) Add a student (2) Drop a student (3) Find students by the first letter of the last name (4) Display all Students (5) Exit

Enter your choice: 4 Student List: 10, Mary, Rueda, 20 20, Esi, Jedari, 30 30, Luis, Rueda, 30

Main Menu (1) Add a student (2) Drop a student (3) Find students by the first letter of the last name (4) Display all Students (5) Exit

Enter your choice: 3 First letter of last name = R 10, Mary, Rueda, 20 30, Luis, Rueda, 30

Main Menu (1) Add a student (2) Drop a student (3) Find students by the first letter of the last name (4) Display all Students (5) Exit

Enter your choice: 2 SID = 10 Student Dropped.

Main Menu (1) Add a student (2) Drop a student (3) Find students by the first letter of the last name (4) Display all Students (5) Exit

Enter your choice: 4 Student List: 20, Esi, Jedari, 30 30, Luis, Rueda, 30

Main Menu (1) Add a student (2) Drop a student (3) Find students by the first letter of the last name (4) Display all Students (5) Exit

Enter your choice: 5 End!

As the terminal session shows, the Add a student option allows the user to add a student, and the Drop a student option allows the user to drop a student from the list. The Find students by the first letter of last name option asks for a letter and finds and displays all students whose last name starts with the input letter. Display all students option lists the students. Finally, the Exit option will exit the loop.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!