Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

27. Code Java application program that keeps track of student information at your college (see Exercise 25). Include their names, identification numbers, and grade point

27. Code Java application program that keeps track of student information at your college (see Exercise 25). Include their names, identification numbers, and grade point averages in a fully encapsulated, homogeneous singly linked list. When launched, the user will be asked to input 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, 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. If the user requests an operation on a node not in the structure, the program output should be node not in structure. Otherwise, the message operation complete should be output.

Here is the info from exercise 25:

package Listing; import java.util.Scanner;

public class Listing { private String name; private String number; private String gpa; public Listing() { this.name = ""; this.number = ""; this.gpa = ""; } public Listing(String name, String number, String gpa) { this.name = name; this.number = number; this.gpa = gpa; } public String toString() { return ("Name is " + name + " Number is " + number + " GPA is " + gpa); } public Listing deepCopy() { Listing clone = new Listing(name, number, gpa); return clone; } public int compareTo(String targetKey) { return(name.compareTo(targetKey)); } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getNumber() { return number; } public void setNumber(String number) { this.number = number; } public String getGPA() { return gpa; } public void setGPA(String gpa) { this.gpa = gpa; } public void input() { Scanner userInput = new Scanner(System.in); System.out.println("Enter the name: "); name = userInput.nextLine(); System.out.println("Enter the number: "); number = userInput.nextLine(); System.out.println("Enter a GPA:"); gpa = userInput.nextLine(); } public static void main(String[] args) { Listing List = new Listing(); List.input(); System.out.println(List.toString()); List.deepCopy(); System.out.println("Info has been added"); } }

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

Step: 3

blur-text-image

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 And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124251, 978-3031124259

More Books

Students also viewed these Databases questions

Question

7. Define cultural space.

Answered: 1 week ago

Question

8. Describe how cultural spaces are formed.

Answered: 1 week ago