Back to Library
QID: #109509
Solution for QID #109509: Write a program named LahZSB that will use the Insertion Sor | StudyHelpMe
Write a program named LahZSB that will use the Insertion Sort to sort an array of objects. 3. 'Create a secondary class named Student with the following: i. 2 instance variables 1. Name [String] 1. GPA {double} ii. A constructor that receives a String and a double as parameters and ?lls in the instance yan'abla iii. A double method named getEPA {no parameters} that returns the gpa iv. A String method named toString [no parameters] that returns a SIIing containing the instance yan'abla [name 81 EPA} with labels. h. Back in the main class: i. 1u'ii'rite a void method that receives an array of Stu dent objects as a parameter an d uses the Insertion Sort algorithm to sort the array by the Student G PA's. ['I'our method should have all the steps ofthe Insertion Sort, not a shortcut] ii. In the main method: 1. Declare an arrayI of 10 Student objects 2. Read the name and GPA for each Student object from the text ?le [LabESBtirt] then create the object and add it to the array 3. Call the yoid sorting method sending the array as a parameter it. Print the array
ZERO AI
Human Written
Human Written
PHD EXPERTS
Verified
Verified
TURNITIN
Clean Report
Clean Report
FAST DELIVERY
Instant/Hourly
Instant/Hourly