Question
Data Structures and Algorithms using Java A database is to be developed to keep track of student information at your college. The underlying information will
Data Structures and Algorithms using Java
A database is to be developed to keep track of student information at your college. The underlying information will include only three data fields: name, identification number, and grade point averages. The data set will be accessed in the key field model, with the students name being the key field. Code a class named Student that defines the nodes. Your class should include all of the following:
- a constructor that contains a parameter for each data field
- a default constructor
- a copy constructor
- a toString( ) method
- a deepCopy( ) method
- a compareTo( ) method with a String parameter
- a get for each data field
- appropriate set method(s) for your data fields
- an input method
Your input method should use console input. Do not use the JOptionPane pop-up dialogs! Test with a progressively developed driver program that verifies the functionality of all of its methods.
Code another class that is a data structure that keeps track of student information at your college using the Student class you have developed above as the individual data within. You may choose to use a sorted array-based data structure, and unsorted optimized data structure, or a structure that you develop that uses the Java API ArrayList class. Your class structure should have appropriate insert, fetch, delete, update, and showAll methods.
Code the application so that when launched, the user will be asked to input the maximum size of the data set, the initial number of students, and the initial data set. Once this is complete, 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 in sorted order, and
6 to exit the program.
The program should perform an unlimited number of operations until the user enters a 6 to exit the program.
Was told the "Copy Constructor" does not exist in Java but its in my classwork and listed online like this,
/** * Copy constructor. */ public Galaxy(Galaxy galaxy) { this(galaxy.getMass(), galaxy.getName()); //no defensive copies are created here, since //there are no mutable object fields (String is immutable) } Learning this for the first time so any help is appreciated and if its only possible to be completed without a Copy Constructor thats ok.
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