Question: create a Java program that will be used to calculate ROI on three different pieces of equipment and sort it from best to least ROI.

create a Java program that will be used to calculate ROI on three different pieces of equipment and sort it from best to least ROI. The program must prompt the user to enter the brand name of the equipment, the gain, and the cost for each piece of equipment.

In this coding assignment, you will express searching and sorting algorithms to return the ROI best to least for each piece of equipment. You must apply algorithmic design techniques in developing your program so that you can ensure the user will receive a correctly sorted list.


I've created the program and it works except for one error that keeps coming up and I'm not sure how to write that part of the code to correct the issue. I'm listing the code below and uploading a screenshot to show were I'm having issue with the code. Any and all help is much appreciated.


The information I have to be able to input into this program is:

2 import java.util.Scanner; import java.util.LinkedList; class Week5AssignmentROI { class Node > {public String equipment; public double cost; public double gain; public double ROI;public Node (String equipment1, double gain, double costl, double ROI1) { this.equipment

2 import java.util.Scanner; import java.util.LinkedList; class Week5AssignmentROI { class Node > { public String equipment; public double cost; public double gain; public double ROI; public Node (String equipment1, double gain, double costl, double ROI1) { this.equipment = equipment1; this.cost = costl; this.gain = gain1; this.ROI = ROI1; public static void main(String[] args) { Scanner in = new Scanner(System.in); String equip; double cost; double gain; double ROI; int i=1; LinkedList list = new LinkedList(); while (i==1) { System.out.println("Enter equipment name: "); equip in.nextLine();

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Based on the provided code it seems like youre trying to create a program to calculate Return on Inv... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!