Computer Science Homework Help

CPT 307 Ashford University Algorithms & Data Structures in Java Questions

 

Calculate ROI Program

Prior to beginning work on this assignment read What is ‘Return on Investment – ROI’ (Links to an external site.). Review Chapter 1 in Data Structures Essentials, as well as the following web pages from Week 3: Data Structure – Linked List (Links to an external site.); Java Examples – Get Elements of a LinkedList (Links to an external site.); Java – The LinkedList Class (Links to an external site.); Lesson: Implementations (Links to an external site.); List Implementations (Links to an external site.); and The List Interface (Links to an external site.).

Students: Be sure to download and save a PDF version of your textbook for future reference. It will be used in later courses within your program, including the final, capstone course. Zybooks limits online access to your course textbooks to a 12-month period. (Zybook Download Instructions download)

For this assignment, you will take on the role of a member of an IT department. Your chief technology officer (CTO) has tasked your department with the replacement of IT equipment. Your manager does not want to buy a piece of equipment based on the brand name alone. Rather, your manager wants to know the return on investment for each piece in order to make a sound purchasing decision.

Your task is to write 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. Utilize a LinkedList class to create the list. Include comments for each section of the program. You may select variable names as long as proper Java syntax is used. You will also submit your source code in a zip file.

Utilize a Java LinkedList to input the brand name of the equipment along with the equipment’s corresponding gain and cost. The input should be completed by the user either via keyboard or via file. As a last resort, the data can be hard-coded into the program.

The input for this calculation is in the Gains and Costs for Equipment downloadtable.

Utilize the ROI calculation (below) with the data from the LinkedList. You may select any of the sorting algorithms from Chapter 1 of Data Structures Essentials to sort the ROI from best to least return.

The calculation for Return on Investment Calculation (ROI) is as follows:

ROI = (Gain from Investment – Cost of Investment) / Cost of Investment

Sort from the best to least ROI, and display to the screen the equipment name, gain, cost, and calculated ROI. The program must include the code to inform the user that the program has completed processing.

Your code must include the following as comments at the top of the code:

  • Name of program
  • Author/student’s name
  • Course name and number
  • Instructor’s name
  • Date submitted

Take a screen shot of the results page and save the image. When you are finished with your Java program, zip the file(s). Next, submit the zip folder that contains the running source code to the Week 5 Zip File Submission page.  If you need more guidance, review the Zip File Quick Start Guide download. Be sure that you are sharing the zip folder with your instructor only. Your instructor will run your source code to ensure that the functionality runs correctly.