Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Write a program named LabZSC that will use the Bubble Sort to sort an array of objects

Write a program named LabZSC that will use the Bubble Sort to sort an array of objects

Computer Science

Write a program named LabZSC that will use the Bubble Sort to sort an array of objects. 3. Create a secondary class named Software with the following: i. 2 instance variables 1. title [String] 1. price [double] 3. rating [int] ii. A constructorthat receives a String, a double and an int as parameters and fills in the instance variables iii. A double method {no parameters} that returns the price iv. An int IIllaria ble that returns the rating v. A String method named toString [no parameters] that returns a String containing the instance variabla with labels b. Back in the main class: i. Write a void method that receives an array of Software objects as a parameter and uses the Bubble Sort algorithm to sort the array by the prices. ['I'our method should have all the steps ofthe Bubble Sort, not a shortcut} ii. Write a second void method that receives the array and [bubble] sorts them by ratings iii. In the main method: 1. Declare an arrayI of 5 Software objects 1. Read the title, price, and ratingfor each Software object from the text file [LahESCtxtj then create the object and add it to the array 3. Call the void sorting method sending the array as a parameter 4. Print the array

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions