Questions
. A researcher predicts that there is effect of domestic conflict on job performance. Write Hypothesis...

. A researcher predicts that there is effect of domestic conflict on job performance. Write Hypothesis for this research to mention the interest of researcher clearly. Also mention the hypothesis which will be tested for this research. (In other words, write null hypothesis and alternative hypothesis in words).
H0:_______________________________________________________________________________________ H1:_______________________________________________________________________________________ The confidence interval was 91% and the p-value was 0.09. How would you rephrase the hypothesis to publish the result?

In: Psychology

Abstract Algebra For the group S4, let H be the subset of all permutations that fix...

Abstract Algebra
For the group S4, let H be the subset of all permutations that fix the element 4.
a) show this is a subgroup
b) describe an isomorphism from S3 to H

In: Advanced Math

Report About (( Lift Mechanism )) 1- Abstract 2-Introduction 3- Model Description 4- Discussion 5. Conclusions...

Report About (( Lift Mechanism ))

1- Abstract 2-Introduction
3- Model Description 4- Discussion
5. Conclusions 6. References

! DONT COPY IT Please !

In: Mechanical Engineering

Creat a theater booking system in java language using : 1.OOP objects -Classes 2.encapsulation 3.polymorphism 4.inheritance...

Creat a theater booking system in java language using :

1.OOP objects -Classes
2.encapsulation
3.polymorphism
4.inheritance
5.abstract class

In: Computer Science

Write a Java application that implements the following: Create an abstract class called GameTester. The GameTester...

Write a Java application that implements the following:

Create an abstract class called GameTester. The GameTester class includes a name for the game tester and a boolean value representing the status (full-time, part-time).

Include an abstract method to determine the salary, with full-time game testers getting a base salary of $3000 and part-time game testers getting $20 per hour. Create two subclasses called FullTimeGameTester, PartTimeGameTester.

Create a console application that demonstrates how to create objects of both subclasses. Allow the user to choose game tester type and enter the number of hours for the part-time testers.

In: Computer Science

A 29-year-old pregnant lady (22 weeks) has booked a trip to visit friends and family in...

A 29-year-old pregnant lady (22 weeks) has booked a trip to visit friends and family in India in 4 weeks' time. She has a three years old child who is very thin and has Asthma on treatment.

Mention any three issues that need to be raised and informed to the lady prior to travel.

• Please (discuss the issue in details and support them with evidence)

In: Nursing

Hello, I need an expert answer for one of my JAVA homework assignments. I will be...

Hello, I need an expert answer for one of my JAVA homework assignments. I will be providing the instructions for this homework below:

For this lab, you will write the following files:

  • AbstractDataCalc
  • AverageDataCalc
  • MaximumDataCalc
  • MinimumDataCalc

As you can expect, AbstractDataCalc is an abstract class, that AverageDataCalc, MaximumDataCalc and MinimumDataCalc all inherit.

We will provide the following files to you:

  • CSVReader
    A simple CSV reader for Excel files
  • DataSet
    This file uses CSVReader to read the data into a List> type structure. This of this as a Matrix using ArrayLists. The important methods for you are rowCount() and getRow(int i)
  • Main
    This contains a public static void String[] args. You are very free to completely change this main (and you should!). We don't test your main, but instead your methods directly.

Sample Input / Output

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Given the following CSV file

1,2,3,4,5,6,7
10,20,30,40,50,60
10.1,12.2,13.3,11.1,14.4,15.5

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The output of the provided main is:

 Dataset Results (Method: AVERAGE)
 Row 1: 4.0
 Row 2: 35.0
 Row 3: 12.8

 Dataset Results (Method: MIN)
 Row 1: 1.0
 Row 2: 10.0
 Row 3: 10.1

 Dataset Results (Method: MAX)
 Row 1: 7.0
 Row 2: 60.0
 Row 3: 15.5

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Specifications

You will need to implement the following methods at a minimum. You are free to add additional methods.

AbstractDataCalc

  • public AbstractDataCalc(DataSet set) - Your constructor that sets your dataset to an instance variable, and runCalculations() based on the dataset if the passed in set is not null. (hint: call setAndRun)
  • public void setAndRun(DataSet set) - sets the DataSet to an instance variable, and if the passed in value is not null, runCalculations on that data
  • private void runCalculations() - as this is private, technically it is optional, but you are going to want it (as compared to putting it all in setAndRun). This builds an array (or list) of doubles, with an item for each row in the dataset. The item is the result returned from calcLine.
  • public String toString() - Override toString, so it generates the format seen above. Method is the type returned from get type, row counting is the more human readable - starting at 1, instead of 0.
  • public abstract String getType() - see below
  • public abstract double calcLine(List line) - see below

AverageDataCalc

Extends AbstractDataCalc. Will implement the required constructor and abstract methods only.

  • public abstract String getType() - The type returned is "AVERAGE"
  • public abstract double calcLine(List line) - runs through all items in the line and returns the average value (sum / count).

MaximumDataCalc

Extends AbstractDataCalc. Will implement the required constructor and abstract methods only.

  • public abstract String getType() - The type returned is "MAX"
  • public abstract double calcLine(List line) - runs through all items, returning the largest item in the list.

MinimumDataCalc

Extends AbstractDataCalc. Will implement the required constructor and abstract methods only.

  • public abstract String getType() - The type returned is "MIN"
  • public abstract double calcLine(List line) - runs through all items, returning the smallest item in the list.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

CSVReader.java


import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;


public class CSVReader {
    private static final char DELIMINATOR = ',';
    private Scanner fileScanner;

  
    public CSVReader(String file) {
        this(file, true);
    }

  
    public CSVReader(String file, boolean skipHeader) {
        try {
            fileScanner = new Scanner(new File(file));
            if(skipHeader) this.getNext();
        }catch (IOException io) {
            System.err.println(io.getMessage());
            System.exit(1);
        }
    }

  
    public List<String> getNext() {
        if(hasNext()){
            String toSplit = fileScanner.nextLine();
            List<String> result = new ArrayList<>();
            int start = 0;
            boolean inQuotes = false;
            for (int current = 0; current < toSplit.length(); current++) {
                if (toSplit.charAt(current) == '\"') { // the char uses the '', but the \" is a simple "
                    inQuotes = !inQuotes; // toggle state
                }
                boolean atLastChar = (current == toSplit.length() - 1);
                if (atLastChar) {
                    result.add(toSplit.substring(start).replace("\"", "")); // remove the quotes from the quoted item
                } else {
                    if (toSplit.charAt(current) == DELIMINATOR && !inQuotes) {
                        result.add(toSplit.substring(start, current).replace("\"", ""));
                        start = current + 1;
                    }
                }
            }
            return result;
        }
        return null;
    }

  
    public boolean hasNext() {
        return (fileScanner != null) && fileScanner.hasNext();
    }

}

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

DataSet.java

import java.util.ArrayList;
import java.util.List;

public class DataSet {
    private final List<List<Double>> data = new ArrayList<>();


    public DataSet(String fileName) {
        this(new CSVReader(fileName, false));
    }

  
    public DataSet(CSVReader csvReader) {
        loadData(csvReader);
    }

  
    public int rowCount() {
        return data.size();
    }

  
    public List<Double> getRow(int i) {
        return data.get(i);
    }

  
    private void loadData(CSVReader file) {
        while(file.hasNext()) {
            List<Double> dbl = convertToDouble(file.getNext());
            if(dbl.size()> 0) {
                data.add(dbl);
            }
        }
    }

  
    private List<Double> convertToDouble(List<String> next) {
        List<Double> dblList = new ArrayList<>(next.size());
        for(String item : next) {
            try {
                dblList.add(Double.parseDouble(item));
            }catch (NumberFormatException ex) {
                System.err.println("Number format!");
            }
        }
        return dblList;
    }


  
    public String toString() {
        return data.toString();
    }
}

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Main.java

public class Main {
  
    public static void main(String[] args) {
        String testFile = "sample.csv";
        DataSet set = new DataSet(testFile);
        AverageDataCalc averages = new AverageDataCalc(set);
        System.out.println(averages);
        MinimumDataCalc minimum = new MinimumDataCalc(set);
        System.out.println(minimum);
        MaximumDataCalc max = new MaximumDataCalc(set);
        System.out.println(max);
    }
  
}

In: Computer Science

mention 5 sources of finance available to an entrepreneur

mention 5 sources of finance available to an entrepreneur

In: Economics

Mention two equations for determination of GFR value.

Mention two equations for determination of GFR value.

In: Biology

definition for a “Corporation” and mention and explain the “Advantages” and “Disadvantages”

definition for a “Corporation” and mention and explain the “Advantages” and “Disadvantages”

In: Accounting