Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*Java* A database is to be developed to keep track of student information at your school. It will include names, identification numbers, and grade point

*Java* A database is to be developed to keep track of student information at your school. 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 name 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.

image text in transcribed

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 + "In Number is " + number + " "); 14. 15. 16. public Node deepCopy) {Node clone = new Node (name, address, number): return clone; 17 18 19. 20. public int compareToString targetkey) { return (name.compareTo(targetKey)); 21. public void setAddress(String a) // coded to demonstrate 11 encapsulation { address = a; WOW public void input() {name = JOptionPane.showInput Dialog("Enter a name'); address = JOptionPane.showInputDialog("Enter an address); number = JOptionPane.showInput Dialog("Enter a number"); 2. } // end of inputNode method 9.} // end of class Node

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

Database Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

More Books

Students also viewed these Databases questions