ASSIGNMENT FOUR – APPLICATION ASSIGNMENT THREE – APPLICATION LO-COMP 8016 Page 1 | Version 9 SUBMISSION INSTRUCTIONS Send ONE *.zip compressed file containing all your *.java. (no .class files) Submit...

1 answer below »
can i get the same expert who worked on order no: 76310 since this builds off that assignment.
also can i get a word document explaining how to run it.
And
i attached a recent pic of the type of comments i need on the files. i'm sure the expert will uinderstand. i'll replace the name with my own after i download it.





ASSIGNMENT FOUR – APPLICATION ASSIGNMENT THREE – APPLICATION LO-COMP 8016 Page 1 | Version 9 SUBMISSION INSTRUCTIONS Send ONE *.zip compressed file containing all your *.java. (no .class files) Submit your assignment through blackboard (submit assignment link). Name your assignment file (the zip file) Assignment_Three_. For example; Assignment_Three_Neilsen_Janeil.zip NOTE: All external files and images must be loaded from your (C:\temp\). GRADING MATRIX The following provides you with feedback on each area you are graded on for the assignments in this course. Trait 90% –- 100% 70% –- 89% 50% - 69% 0% - 49% Specifications The program works and meets all of the specifications. The program works and produces the correct results and displays them correctly. It also meets most of the other specifications. The program produces correct results but does not display them correctly. The program is producing incorrect results. Readability The code is exceptionally well organized and very easy to follow. The code is fairly easy to read. The code is readable only by someone who knows what it is supposed to be doing. The code is poorly organized and very difficult to read. Reusability The code could be reused as a whole or each routine could be reused. Most of the code could be reused in other programs. Some parts of the code could be reused in other programs. The code is not organized for reusability. Documentation The documentation is well written and clearly explains what the code is accomplishing and how. The documentation consists of embedded comment and some simple header documentation that is somewhat useful in understanding the code. The documentation is simply comments embedded in the code with some simple header comments separating routines. The documentation is simply comments embedded in the code and does not help the reader understand the code. Delivery The program was delivered on time. The program was delivered within a week of the due date. The code was within 2 weeks of the due date. The code was more than 2 weeks overdue. Efficiency The code is extremely efficient without sacrificing readability and understanding. The code is fairly efficient without sacrificing readability and understanding. The code is brute force and unnecessarily long. The code is huge and appears to be patched together. ASSIGNMENT THREE – APPLICATION LO-COMP 8016 Page 2 | Version 9 ASSIGNMENT BACKGROUND This assignment builds upon the lecture notes and chapters 10 to 13 . ASSIGNMENT PREPARATION In order to prepare for this assignment question you should attempt:  all debugging exercise in chapters 10 to 13  complete 5 exercises from each chapter 10 to 13 (odd questions) ASSIGNMENT QUESTION – Application In the last assignment, you started to create the framework for an application that analysis large volume of data. We are now going to add a new file to perform calculations on the information. Challenge: Use a Lambda expression somewhere in this assignment. This means you will have to use an interface… Create a file Calculations.java. This is the file that will perform calculations in analyzing the data in the previous assignment. Note: You will want to use a smaller version of your data file (20 rows) for testing. Your Calculations.java class requires the following methods: Method: createDateArray You will need to create one array to hold the dates (the first column of the data) which will be a one dimensional array ie: Date [ ] dateArray = new Date[r.findRowNumber()]; Use try and catch block Method: createDataArray You will need to create a second array to hold the data from the remaining 6 columns ie: float[ ] [ ] dataArray = new float[r.findRowNumber( )] [7]; This is done, because we need to perform mathematical calculations on the values which cannot be done if the values are in a string format This can be accomplished by using a switch case loop or not Method: printArray Print the data in the array (for the arrays just created) Unknown ASSIGNMENT THREE – APPLICATION LO-COMP 8016 Page 3 | Version 9 Create a method that performs some basic calculations to answer the following questions:  What date had the highest opening value?  What date had the highest closing value?  What date had the lowest opening value?  What date had the lowest closing value?  What was the top ten dates with the highest closing value (in order of high to lowest)?  What was the top ten dates with the lowest closing value (in order of lowest to highest)?  Add a column difference for all rows (determine by open amount - closing amount) and write to a new file (saved in your c:\temp\ directory). Make sure all lists/tables outputted is in good format and has column headers. Modify the file DataAnalyzer.java. This file will be used to call the methods in ReadFiles.java and Calculations.java. Be sure to demonstrate that all of your methods work through DataAnalyzer.java. The results of the calculations should be outputted to the console or you can use JOption. When submitting your assignment, be sure to include your data files for testing and make sure your application is configure to open the data files from c:\temp. Java Programming, 9th ed. http://www.a-pdf.com/?tr-demo http://www.a-pdf.com/?tr-demo http://www.a-pdf.com/?tr-demo JAVA™ PROGRAMMING JOYCE FARRELL Australia • Brazil • Mexico • Singapore • United Kingdom • United States N I N T H E d I T I o N 97070_fm_hr_i-xxiv.indd 1 27/02/18 7:34 pm This is an electronic version of the print textbook. Due to electronic rights restrictions, some third party content may be suppressed. Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. The publisher reserves the right to remove content from this title at any time if subsequent rights restrictions require it. For valuable information on pricing, previous editions, changes to current editions, and alternate formats, please visit www.cengage.com/highered to search by ISBN#, author, title, or keyword for materials in your areas of interest. Important Notice: Media content referenced within the product description or the product text may not be available in the eBook version. Java™ Programming, Ninth Edition Joyce Farrell SVP, GM Skills: Jonathan Lau Product Team Manager: Kristin McNary Associate Product Manager: Kate Mason Executive Director of Content Design, Skills: Marah Bellegarde Director, Learning Design – Skills Computing: Leigh Hefferon Learning Designer: Natalie Onderdonk Product Assistant: Jake Toth Marketing Director: Michele McTighe Marketing Manager: Stephanie Albracht Content Project Manager: Michele Stulga Senior Designer: Diana Graham Production Service/Composition: SPi Global Cover image: Colormos/Photodisc /Getty Images © 2019, 2016, 2014, 2012 Cengage Learning, Inc. Unless otherwise noted, all content is © Cengage. ALL RIGHTS RESERVED. No part of this work covered by the copyright herein may be reproduced or distributed in any form or by any means, except as permitted by U.S. copyright law, without the prior written permission of the copyright owner. Unless otherwise noted all screenshots are courtesy of Microsoft Corporation. Unless otherwise noted all tables/figures exhibits are © 2019 Cengage®. For product information and technology assistance, contact us at Cengage Customer & Sales Support, 1-800-354-9706 or support.cengage.com. For permission to use material from this text or product, submit all requests online at www.cengage.com/permissions. Library of Congress Control Number: 2018933919 Softbound ISBN: 978-1-337-39707-0 Loose Leaf ISBN: 978-1-337-68590-0 Cengage 20 Channel Center Street Boston, MA 02210 USA Cengage is a leading provider of customized learning solutions with employees residing in nearly 40 different countries and sales in more than 125 countries around the world. Find your local representative at www.cengage.com. Cengage products are represented in Canada by Nelson Education, Ltd. To learn more about Cengage platforms and services, visit www.cengage.com. To register or access your online learning solution or purchase materials for your course, visit www.cengagebrain.com. Notice to the Reader Publisher does not warrant or guarantee any of the products described herein or perform any independent analysis in connection with any of the product information contained herein. Publisher does not assume, and expressly disclaims, any obligation to obtain and include information other than that provided to it by the manufacturer. The reader is expressly warned to consider and adopt all safety precautions that might be indicated by the activities described herein and to avoid all potential hazards. By following the instructions contained herein, the reader willingly assumes all risks in connection with such instructions. The publisher makes no representations or warranties of any kind, including but not limited to, the warranties of fitness for particular purpose or merchantability, nor are any such representations implied with respect to the material set forth herein, and the publisher takes no responsibility with respect to such material. The publisher shall not be liable for any special, consequential, or exemplary damages resulting, in whole or part, from the readers’ use of, or reliance upon, this material. Printed in the United States of America Print Number: 01 Print Year: 2018 97070_fm_hr_i-xxiv.indd 2 27/02/18 7:34 pm Brief Contents Preface
Answered 4 days AfterMar 03, 2021

Answer To: ASSIGNMENT FOUR – APPLICATION ASSIGNMENT THREE – APPLICATION LO-COMP 8016 Page 1 | Version 9...

Valupadasu answered on Mar 08 2021
149 Votes
CalculationInterface.java
CalculationInterface.java
/**
 * @author Student
 * @version 2.0
 * @since 2021-03-07
 */
public interface CalculationInterface {
    public abstract void calculate();
}
Calculations.java
Calculations.java
import java.io.BufferedOutputStream;
import java.io.BufferedWriter;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.nio.fil
e.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
/**
 * @author Student
 * @version 2.0
 * @since 2021-03-07
 */
public class Calculations {
    private Date[] dateArray;
    private float[][] dataArray;
    public void createDateArray(String[][] stockData) {
        try {
            dateArray = new Date[stockData.length];
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
            for (int idx = 0; idx < stockData.length; idx++) {
                dateArray[idx] = format.parse(stockData[idx][0]);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    public void createDataArray(String[][] stockData) {
        dataArray = new float[stockData.length][6];
        for (int i = 0; i < stockData.length; i++) {
            for (int j = 1; j < stockData[i].length; j++) {
                dataArray[i][j - 1] = Float.parseFloat(stockData[i][j]);
            }
        }
    }
    public void performCalculations() {
        CalculationInterface calculationsObj = () -> {
            float highestOpen = Integer.MIN_VALUE;
            float highestClose = Integer.MIN_VALUE;
            float lowestOpen = Integer.MAX_VALUE;
            float lowestClose = Integer.MAX_VALUE;
            Date highestOpenDate = new Date();
            Date lowestOpenDate = new Date();
            Date highestCloseDate = new Date();
            Date lowestCloseDate = new Date();
            Map closeValList = new HashMap<>();
            for (int i = 0; i < dataArray.length; i++) {
                for (int j = 0; j < dataArray[i].length; j++) {
                    if (j != 0 && j != 3) {
                        continue;
                    }
                    float tempValue = dataArray[i][j];
                    if (j == 0) {
                        if (tempValue > highestOpen) {
                            highestOpen = tempValue;
                            highestOpenDate = dateArray[i];
                        }
                        if (tempValue < lowestOpen) {
                            lowestOpen = tempValue;
                            lowestOpenDate = dateArray[i];
                        }
                    } else {
                        closeValList.put(i, tempValue);
                        if (tempValue > highestClose) {
                            highestClose = tempValue;
                            highestCloseDate = dateArray[i];
                        }
                        if (tempValue < lowestClose) {
                            lowestClose = tempValue;
                            lowestCloseDate = dateArray[i];
                        }
                    }
                }
            }
            System.out.printf("Date with highest opening value: %tF %n", highestOpenDate);
            System.out.printf("Date with lowest opening value: %tF %n", lowestOpenDate);
            System.out.printf("Date with highest closing value: %tF %n", highestCloseDate);
            System.out.printf("Date with lowest closing value: %tF %n", lowestCloseDate);
            List> list = new LinkedList>(closeValList.entrySet());
            Collections.sort(list, new Com...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here