logo Use CA10RAM to get 10%* Discount.
Order Nowlogo

Create a java console application Add a java class Student with the following fields

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

1. Create a java console application

2. Add a java class Student with the following fields: Firstname, lastname, studentId, currentGPA Add constructor and the getters, also add a setter for the currentGPA only Make sure that the value used to set a new gpa is valid, otherwise through an exception. Override the toString() to return a formatted string containing all the info about the student

3. In the Main class Create a static LinkedList of students. So that all the methods in Main class have access to it.

4. Define a method preload() method to add about 10 student objects to the linkedList.

5. Define a method display() method to display each student in the studentList

6. Request student data from user, then add the new student to the end of the studentList

7. From main method, request an index from the user, validate it, then remove the student at the given index.

8. Define a method getStudentByID(int studentId) that returns the Student object with such id or null if not found Use a for loop (similar to c# foreach) to search for a student with such studentId. If found return the Student object, otherwise return null.

9. From main method, request a studentId from user, use it to get this student from the list. Also request a new gpa and change the student currentGpa to the new one.

10. Write a method void swapFirstLast to swap the first student in the list and the last student in the list. Display to see the changes

11. From main method call the swap method and display the list

 

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

734 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

844 Answers

Hire Me
expert
Husnain SaeedComputer science

818 Answers

Hire Me
expert
Atharva PatilComputer science

994 Answers

Hire Me