Question
A database is to be developed to keep track of student information at your college. It will include names, identification numbers, and grade point averages.
A database is to be developed to keep track of student information at your college. It will include names, identification numbers, and grade point averages. The data set will be accessed in the key field mode, with the student's name being the key field. Code a class named StudentListings that defines the nodes. Your class should include all the methods in the class shown in Figure 2.28 except for the setAddress() method. It should also include a no-parameter constructor. Test it with a progressively developed driver program that verifies the functionality of all of its methods.
figure 2.28
public class Node
{
private String name; //key field
private String address;
private String number;
public Node(String n, String a, String num)
{
name=n;
address =a;
number= num;
}
public String toString()
{
return("Name is" + name +
" Address is" + address +
" Number is" + number + " ");
}
public Node deepCopy()
{
Node clone = new Node(name, address,number);
return clone;
}
public int compareTo(String targetKey)
{
return(name.compareTo(targetKey));
}
public void setAddress(String a) // coded to demonstrate
//encapsulation
{
address = a;
}
public void input()
{
name = JOprtionPane.shoInputDialog("Enter a name");
address = JOptionPane.showInputDialog("Enter an address");
number = JOptionPane.showInputDialog("Enter a number");
} // end of inputNode method
//end of class Node
include pseudo code and flow chart please
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started