Hi, can i get the same expert who worked on #76907 and #76310 please. mainly because the assignment is related to those two previous assignments.I've attached the assignment PDF and the previous two...

1 answer below »
Hi, can i get the same expert who worked on #76907 and #76310 please. mainly because the assignment is related to those two previous assignments.I've attached the assignment PDF and the previous two assignments in zipped folder in case it makes the assignment easier. i've also attached a screenshot of how the comments need to be added in the new assignment. and i need the new assignment to be saved as Mike_Mawson_Asgn_Three.
i've also attached the textbook as a reference.
and could i get detailed instructions on how to run the program in a seperate word document as well. i'll be using IntelliJ on my end to run it.





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 � � � � � � � � � � � � � � � � xiv CHAPTER 1 Creat ing Java Programs � � � � � � � � � � 1 CHAPTER 2 Us ing Data � � � � � � � � � � � � � � � � 49 CHAPTER 3 Us ing Methods, Classes, and Objects � � � 110 CHAPTER 4 More Object Concepts � � � � � � � � � � 170 CHAPTER 5 Making Decis ions � � � � � � � � � � � � 230 CHAPTER 6 Looping � � � � � � � � � � � � � � � � 283 CHAPTER 7 Characters, Str ings, and the StringBuilder � � � � � � � � � � � � � 330 CHAPTER 8 Arrays � � � � � � � � � � � � � � � � � 369 CHAPTER 9 Advanced Array Concepts � � � � � � � � 416 CHAPTER 10 Introduct ion to Inher i tance � � � � � � � � 467 CHAPTER 11 Advanced Inher i tance Concepts � � � � � � 513 CHAPTER 12 Except ion Handl ing � � � � � � � � � � � 570 CHAPTER 13 F i le Input and Output � � � � � � � � � � � 635 CHAPTER 14 Introduct ion to Swing Components � � � � 698 CHAPTER 15 Us ing JavaFX and Scene Bui lder � � � � � � 758 APPENdIx A Work ing wi th the Java Plat form � � � � � � 799 APPENdIx B Data Representat ion � � � � � � � � � � � 804 APPENdIx C Formatt ing Output � � � � � � � � � � � � 810 APPENdIx d Generat ing Random Numbers � � � � � � � 820 APPENdIx E Javadoc � � � � � � � � � � � � � � � � 826 G lossary � � � � � � � � � � � � � � � � 834 Index � � � � � � � � � � � � � � � � � 853 iii 97070_fm_hr_i-xxiv.indd 3 27/02/18 7:34 pm 97070_fm_hr_i-xxiv.indd 4 27/02/18 7:34 pm Table of Contents Preface � � � � � � � � � � � � � � � � xiv CHAPTER 1 Creat ing Java Programs � � � � � � � � � � 1 Learning Programming Terminology � � � � � � � � � � � � � 2 Comparing Procedural and Object-Oriented Programming Concepts � � � � � � � � � � � � � � � � � � 5 Procedural Programming � � � � � � � � � � � � � � � � � 5 Object-Oriented Programming � � � � � � � � � � � � � � 6 Understanding Classes, Objects, and Encapsulation � � � � 7 Understanding Inheritance and Polymorphism � � � � � � � 9 Features of the Java Programming Language � �
Answered 9 days AfterMar 19, 2021

Answer To: Hi, can i get the same expert who worked on #76907 and #76310 please. mainly because the assignment...

Valupadasu answered on Mar 28 2021
143 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.file.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 Date[] performCalculations() {
        Date[] calDates = new Date[4];
        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];
                        }
                    }
                }
            }

            calDates[0] = highestOpenDate;
            calDates[1] = lowestOpenDate;
            calDates[2] = highestCloseDate;
            calDates[3] = lowestCloseDate;
            List> list = new LinkedList>(closeValList.entrySet());
            Collections.sort(list, new Comparator>() {
                public int compare(Map.Entry o1, Map.Entry o2) {
                    return (o1.getValue()).compareTo(o2.getValue());
                }
            });
            System.out.println();
            System.out.println("Top ten dates with the highest closing value in order of lowest to highest");
            int count = 0;
            for (Map.Entry entry : list) {
                if (count == 10)
                    break;
                System.out.printf("%tF %n", dateArray[entry.getKey()]);
                count++;
            }
            Collections.sort(list, new Comparator>() {
                public int compare(Map.Entry o1, Map.Entry o2) {
                    return (o2.getValue()).compareTo(o1.getValue());
                }
            });
            count = 0;
            System.out.println();
            System.out.println("Top ten dates with the highest closing value in order of highest to lowest");
            for (Map.Entry entry : list) {
                if (count == 10)
                    break;
                System.out.printf("%tF %n", dateArray[entry.getKey()]);
                count++;
            }
            System.out.println();
            System.out.println(
                    "Calculating the column difference between open amount and clo...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here