1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nadya [2.5K]
3 years ago
9

Code an application program that keeps track of student informationat your college . Include their name, identification numbers,

and grade point averages in a fully encapsulated homogenous 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.

Computers and Technology
1 answer:
timurjin [86]3 years ago
6 0

Answer:

The full code is added in the comments as per regulations. Continuation of driver.java code from the comments is available on the screenshot

Explanation:

Editable code:

//ListingNode.java

class ListingNode {

   private listpro listing11;

   private ListingNode nextnode;

   public ListingNode(listpro listing11) {

       this.listing11 = listing11;

   }

   public listpro getListing() {

       return listing11;

  }

   public void setListing(listpro listing11) {

       this.listing11 = listing11;

   }

   public ListingNode getnextnode() {

       return nextnode;

   }

   public void setnextnode(ListingNode nextnode) {

       this.nextnode = nextnode;

   }

}

public class Listlinked {

   private ListingNode headnode;

   public Listlinked() {

       headnode = null;

   }

   public void insert(listpro listing11) {

       ListingNode listingNode = new ListingNode(listing11);

       if(headnode == null) {

           headnode = listingNode;

       } else {

           ListingNode tempval = headnode;

           while (tempval.getnextnode() != null) {

               tempval = tempval.getnextnode();

           }

           tempval.setnextnode(listingNode);

       }

   }

   public listpro fetch(String name) {

       ListingNode tempval = headnode;

       while (tempval != null) {

           if(tempval.getListing().getNamedata().equalsIgnoreCase(name)) {

               return tempval.getListing();

           }

           tempval = tempval.getnextnode();

       }

       return null;

   }

   public boolean delete(String name) {

       ListingNode tempval = headnode;

       boolean found = false;

       if(headnode != null) {

          if(headnode.getListing().getNamedata().equalsIgnoreCase(name)) {

               headnode = headnode.getnextnode();

               found = true;

           } else {

               while (tempval.getnextnode() != null) {

                   if (tempval.getnextnode().getListing().getNamedata().equalsIgnoreCase(name)) {

                       found = true;

                       tempval.setnextnode(tempval.getnextnode().getnextnode());

                       break;

                   }

                   tempval = tempval.getnextnode();

               }

           }

       }

       return found;

   }

   public void printAll() {

       ListingNode tempval = headnode;

       while (tempval != null) {

           System.out.println(tempval.getListing().toString());

           tempval = tempval.getnextnode();

       }

   }

}

//listpro.java

import javax.swing.*;

public class listpro {

   private String Name;

   private int ID;

   private float grade_point;

   public listpro(){

   }

 public listpro(String Name, int ID, float grade_point){

       this.Name = Name;

       this.ID = ID;

       this.grade_point = grade_point;

   }

   public String getNamedata() {

       return Name;

   }

   public void setNamedata(String Name) {

       this.Name = Name;

   }

   public int getID() {

       return ID;

   }

   public void setID(int ID) {

       this.ID = ID;

   }

   public float getgrade_point() {

       return grade_point;

   }

   public void setgrade_point(float grade_point) {

       this.grade_point = grade_point;

   }

   public listpro deepCopy(){

       listpro clone = new listpro(Name,ID,grade_point);

       return clone;

   }

   public String toString(){

       return "Name : " + Name + "\nID :" + ID + "\nGrade points :" + grade_point;

   }

   public void input(){

       Name = JOptionPane.showInputDialog("Enter a Name");

       ID = Integer.parseInt(JOptionPane.showInputDialog("Enter an ID"));

       grade_point = Float.parseFloat(JOptionPane.showInputDialog("Enter a grade point average"));

   }

}

You might be interested in
Good information is characterized by certain properties. Explain how you understand these characteristtics of good information.
Sedbober [7]

Answer:

here is your ans

Explanation:

Characteristics of good quality information can be defined as an acronym ACCURATE. These characteristics are interrelated; focus on one automatically leads to focus on other.

Accurate

Information should be fair and free from bias. It should not have any arithmetical and grammatical errors. Information comes directly or in written form likely to be more reliable than it comes from indirectly (from hands to hands) or verbally which can be later retracted.

Complete

Accuracy of information is just not enough. It should also be complete which means facts and figures should not be missing or concealed. Telling the truth but not wholly is of no use.

Cost-beneficial

Information should be analysed for its benefits against the cost of obtaining it. It business context, it is not worthwhile to spend money on information that even cannot recover its costs leading to loss each time that information is obtained. In other contexts, such as hospitals it would be useful to get information even it has no financial benefits due to the nature of the business and expectations of society from it.

User-targeted

Information should be communicated in the style, format, detail and complexity which address the needs of users of the information. Example senior managers need brief reports which enable them to understand the position and performance of the business at a glance, while operational managers need detailed information which enable them to make day to day decisions.

Relevant

Information should be communicated to the right person. It means person which has some control over decisions expected to come out from obtaining the information.

Authoritative

Information should come from reliable source. It depends on qualifications and experience and past performance of the person communicating the information.

Timely

Information should be communicated in time so that receiver of the information has enough time to decide appropriate actions based on the information received. Information which communicates details of the past events earlier in time is of less importance than recently issued information like newspapers. What is timely information depends on situation to situation. Selection of appropriate channel of communication is key skill to achieve.

Easy to Use

Information should be understandable to the users. Style, sentence structure and jargons should be used keeping the receiver in mind. If report is targeted to new-comer in the field, then it should explain technical jargons used in the report.

4 0
2 years ago
1.
saul85 [17]

Answer:

1. Speakers

2. Software

3. C.P.U

4. ROM

5. Hard drive

6. RAM

7 0
2 years ago
The process of using the new
IRINA_888 [86]

Answer:

The process of using the new

information system and doing away

with the old system is known as

system <u>development</u>

7 0
2 years ago
We need goku and naruto fight story someone
lana [24]

Answer:

goku comes in and turns super sayain  naruto come in with kurama and naruto get goku with a rasagen and geku is still fist fightin while naruto is using his kurama and turns into kurama and knocks out goku now naruto thinks he won and goku IS HITIN HIM WITH A KAMEKAMEHA GOKU IS SIROUS NOW

Explanation:

8 0
3 years ago
Read 2 more answers
What usually happens at a police check? Do they just look up your name in their system?
sdas [7]

it depends on the kind of police check. like if its a road block type of check, they make sure everything is right. if you get pulled over you get your name ran in the system to check if you have warrents or warning and depends on what you get pulled over for, you could get a ticket or detained.

5 0
3 years ago
Other questions:
  • Mary, Tim, John, and Jenn each sold three million dollars worth of product within six months. Each month one of them was awarded
    12·2 answers
  • What do modern CPUs use to simulate the performance of multiple processors within one processor?
    9·2 answers
  • Blood Alcohol Level (BAL) is the ratio between the alcohol consumed and the blood in the body. A. True B. False
    12·2 answers
  • Identify the correct sequence of steps to change the font from Verdana to Arial.
    10·1 answer
  • Public class Student {
    14·1 answer
  • Write a program to accept 10 different whole number from the user and store them in a
    11·1 answer
  • In our discussion of Computer Hardware, we talked about three essential hardware components that are there inside every computer
    14·1 answer
  • Which item is not part of a college application
    11·1 answer
  • X274: Recursion Programming Exercise: Cannonballs Spherical objects, such as cannonballs, can be stacked to form a pyramid with
    7·1 answer
  • In this exercise we will practice using loops to handle collections/containers. Your job is to write a program that asks the use
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!