Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

30. A database is to be developed to keep track of student information at your college. Their names, identification numbers, and grade point average will

30. A database is to be developed to keep track of student information at your college. Their names, identification numbers, and grade point average will be included. The data set will be accessed in the key field mode, with the students name being the key field. Code a class named Listing that defines the nodes. The class must comply with the guidelines that permit student information nodes to be stored in the fully encapsulated BinaryTree structure discussed in this chapter. As such, your class should include all the methods in the class shown in figure 2.16 and include a getKey method. Test it with a progressively developed driver program that demonstrates the functionality of all of its methods.image text in transcribed

31. Code an application program that keeps track of student information at your college. Include their names, identification numbers, and grade point average in a fully encapsulated, homogeneous, linked-based binary search tree. When launched, the user will be presented with the following menu:

Enter: 1 to insert a new student's information,

2 to fetch and output a student's information,

3 to delete a student's information,

4 to update a student's information,

5 to output all the student information, and

6 to exit the program

1 public class Listing 2. private String name; / key field private String address; private String number; public Listing(String n, String a, String num) 6 addressa; numbernum; 8 9 10 11. 12 13 14 15 16, public String tostring(O return ("Name is+name+ "VnAddress is . + address + "InNumber is +numbern") public Listing deepCopy () { Listing clone= new Listing (name, address, number); return clone; public int compareTo(String targetKey) return (name.compareTo (targetKey)) 20 public void setAddress (String a) / coded to demonstrate /I encapsulation 23. address a; 24 25. > /I end of class Listing I end of setAddress method

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students explore these related Databases questions