Java Programming

Design a Java application that will read a file containing data related to the US. Crime statistics from 1994-2013.

Here are the codes I have so far:

public class USCrimeClass {

// Crime data fields for each data to retrieve

private int year;

private double populationGrowth;

private int maxMurderYear;

private int minMurderYear;

private int maxRobberyYear;

private int minRobberyYear;

/**

* Crime data constructor to set variables

*/

public USCrimeClass(int year, int populationGrowth, int maxMurderYear, int minMurderYear, int maxRobberyYear, int minRobberyYear){

this.year = year;

this.populationGrowth = populationGrowth;

this.maxMurderYear = maxMurderYear;

this.minMurderYear = minMurderYear;

this.maxRobberyYear = maxRobberyYear;

this.minRobberyYear = minRobberyYear;

}

// Constructor defaults

public USCrimeClass(int count){

this.year = 0;

this.populationGrowth = 0.0;

this.maxMurderYear = 0;

this.minMurderYear = 0;

this.maxRobberyYear = 0;

this.minRobberyYear = 0;

}

/**

* Getter methods for each field

* @return percentage growth and years for murder and robbery

*/

public int getYear() {return this.year; }

public double getPopulationGrowth() {return this.populationGrowth; }

public int getMaxMurderYear() {return this.maxMurderYear; }

public int getMinMurderYear() {return this.minMurderYear; }

public int getMaxRobberyYear() {return this.maxRobberyYear; }

public int getMinRobberyYear() {return this.minRobberyYear; }

// Setter method for each field

public void setYear(int year) {this.year = year;}

public void setPopulationGrowth(double populationGrowth) {this.populationGrowth = populationGrowth;}

public void setMaxMurderYear(int maxMurders) {this.maxMurderYear = maxMurders;}

public void setMinMurderYear(int minMurders) {this.minMurderYear = minMurders;}

public void setMaxRobberyYear(int maxRobbery) {this.maxRobberyYear = maxRobbery;}

public void setMinRobberyYear(int minRobbery) {this.minRobberyYear = minRobbery;}

}

import java.io.File;

import java.util.Scanner;

import java.io.FileNotFoundException;

public class USCrimeFile {

public static USCrimeClass[] read(String filename){

// Array declaration

USCrimeClass[] stats = new USCrimeClass[20];

Scanner inputReader = null;

// Variable declaration

int count = 0;

String line;

// Access Crime.csv and create array

try {

File file=new File(“Crime.csv”);

inputReader = new Scanner(new File(“Crime.csv”));

// Read first line

inputReader.nextLine();

while (inputReader.hasNext()) {

line = inputReader.nextLine();

String[] data = line.split(“,”);

stats[count] = new USCrimeClass(Integer.parseInt(data[0]));

stats[count].setPopulationGrowth(Integer.parseInt(data[1]));

stats[count].setMaxMurderYear(Integer.parseInt(data[4]));

stats[count].setMinMurderYear(Integer.parseInt(data[4]));

stats[count].setMaxRobberyYear(Integer.parseInt(data[8]));

stats[count].setMinRobberyYear(Integer.parseInt(data[8]));

count++;

}

return stats;

} catch (FileNotFoundException e) {

e.printStackTrace();

return stats;

}

finally {

inputReader.close();

}

}

// Method calculation for population growth rate

public void populationGrowth(USCrimeClass[] data){

double growthRate;

System.out.println(“Population growth rate: “);

for (int i = 0; i < data.length - 1; i++){

growthRate = 100 * (float) (data[i+1].getPopulationGrowth() – data[i].getPopulationGrowth()) / data[i].getPopulationGrowth();

System.out.println(“From ” + data[i].getYear() + ” to ” + data[i + 1].getYear() + ” the population growth was “+ String.format(“%.4f”, growthRate) + “%”);

}

}

// Method to find year with highest murder rate

public String maxMurderYear(USCrimeClass[] data) {

int iSize = data.length;

double currentMurderRate = 0.00;

double mMurderRate;

int murderHighYear = 0;

String stReturnValue;

// Access array

try {

for (int i = 0; i < iSize; i++) {

// Get murder rate

mMurderRate = data[i].getMaxMurderYear();

if (mMurderRate < currentMurderRate) {

murderHighYear = data[i].getYear();

}

currentMurderRate = mMurderRate;

}

stReturnValue = “The murder rate was highest in ” + murderHighYear + “.”;

return stReturnValue;

}

catch(Exception e){

System.out.println(“Exception” + e.getMessage());

return null;

}

}

// Method to find lowest murder year

public String minMurderYear(USCrimeClass[] data) {

int iSize = data.length;

double currentMurderRate = 0.00;

double mMurderRate;

int murderLowYear = 0;

String stReturnValue;

try {

// Access array

for (int i = 0; i < iSize; i++) {

// Get the murder rate

mMurderRate = data[i].getMinMurderYear();

if (mMurderRate > currentMurderRate) {

murderLowYear = data[i].getYear();

}

currentMurderRate = mMurderRate;

}

stReturnValue = “The murder rate was lowest in ” + murderLowYear + “.”;

return stReturnValue;

} catch (Exception e) {

System.out.println(“Exception” + e.getMessage());

return null;

}

}

// Get the year with highest robberies

public String maxRobberyYear(USCrimeClass[] data) {

int iSize = data.length;

double currentRobberyRate = 0.00;

double dRobberyRate;

int robberyHighYear = 0;

String stReturnValue;

// Access array

try {

for (int i = 0; i < iSize; i++) {

// Get the robbery rate

dRobberyRate = data[i].getMaxRobberyYear();

if (dRobberyRate < currentRobberyRate) {

robberyHighYear = data[i].getYear();

}

currentRobberyRate = dRobberyRate;

}

stReturnValue = “The robbery rate was highest in ” + robberyHighYear + “.”;

return stReturnValue;

} catch (Exception e) {

System.out.println(“Exception” + e.getMessage());

return null;

}

}

// Method to find lowest robbery year

public String minRobberyYear(USCrimeClass[] data) {

int iSize = data.length;

double currentRobberyRate = 0.00;

double dRobberyRate;

int robberyLowYear = 0;

String stReturnValue;

// Access array

try {

for (int i = 0; i < iSize; i++) {

// Get robbery rate

dRobberyRate = data[i].getMinRobberyYear();

if (dRobberyRate > currentRobberyRate) {

robberyLowYear = data[i].getYear();

}

currentRobberyRate = dRobberyRate;

}

stReturnValue = “The robbery rate was lowest in ” + robberyLowYear + “.”;

return stReturnValue;

} catch (Exception e) {

System.out.println(“Exception” + e.getMessage());

return null;

}

}

}

import java.util.Scanner;

public class TestUSCrime {

static Scanner input = new Scanner(System.in);

public static void main(String[] args) {

/**

* Reference USCrimeFile

*/

USCrimeFile oUSCrimeFile = new USCrimeFile();

USCrimeClass[] data = USCrimeFile.read(“Crime.csv”);

/**

* Declare variables

*/

long startTime = System.currentTimeMillis();

long endTime;

String userSelect;

while (true)

{

// Welcome prompt

System.out.println(“n******** Welcome to the US Crime Statistical Application********n”);

System.out.println(“n” + “Enter the number of the question you want answered. Enter ‘Q’ to quit the program:n”);

System.out.println(“1. What were the percentages in population growth for each consecutive year from 1994-2013?”);

System.out.println(“2. What year was the murder rate the highest?”);

System.out.println(“3. What year wat the murder rate the lowest?”);

System.out.println(“4. What year was the robbery rate the highest?”);

System.out.println(“5. What year was the robbery rate the lowest?”);

System.out.println(“Q. Quit the program”);

System.out.println(“nEnter your selection: “);

userSelect = input.nextLine();

System.out.println();

switch (userSelect){

case “1”:

oUSCrimeFile.populationGrowth(data);

break;

case “2”:

System.out.println(“The murder rate was highest in ” + oUSCrimeFile.maxMurderYear(data));

break;

case “3”:

System.out.println(“The murder rate was lowest in ” + oUSCrimeFile.minMurderYear(data));

break;

case “4”:

System.out.println(“The robbery rate was highest in: ” + oUSCrimeFile.maxRobberyYear(data));

break;

case “5”:

System.out.println(“The robbery rate was highest in: ” + oUSCrimeFile.minRobberyYear(data));

break;

case “Q”:

System.out.println(“nThank you for trying the US Crime Statistics Program”);

endTime = System.currentTimeMillis();

System.out.println(“nElapsed time in seconds was: ” + (endTime – startTime) / 1000 + “seconds.”);

System.exit(0);

}

}

}

}

Design an infrastructure solution using an external service provider.

 

  • Describe a business scenario that requires a new or modified IT infrastructure.
  • Analyze the needs of the domain.
  • Design a computing solution for the infrastructure.
  • Prepare a request for proposal (RFP) based on domain needs analysis.

 should be 3-4 pages in length (in APA format). You must use a minimum of 3 sources (one can be your textbook) and you must include in-text citations for at least 2 of your sources. 

Individual Assignment

Use the library and other internet resources to research for information about the history of Cryptography. Write a 3 pages research paper answering these questions.

  • If you were setting up an encryption-based network, what key size would you choose and why? Explain your answer with examples. 
  • How can we apply that security protocol in real life situations?
  • Provide at least two references to support your initial post.

Please note:

  • Apply APA format on your academic writings.
  • provide 3 pages long (not including title and references) as a word document.
  • Include title page, table of content page.
  • Use time new roman or Arial as font type.
  • Use 12 a font size.
  • Use double spaces.
  • Add running head to the upper left corner of your document.
  • Add page numbers to the upper right corner of your document.
  • Add a references page to the end of your document.
  • Do not re-state the questions.
  • Make you own titles and subtitles.
    Include at least two sources (i.e. two references) and use them within your in-text citation.
  • Do not use Wikipedia as a reference.

Data visualization

 

This week we watched a short video on how storytelling and the aims of data visualization go hand in hand. The narrator of the video discusses the aims of data visualization. The narrator states that the aims of data visualization is to, “Maximize how quickly and accurately people decode information from graphics.” The narrator also talks about some shortcomings (disadvantage) of the techniques used to create data visualization for storytelling. Select and discuss one of the mentioned shortcomings. Then discuss what we have learned in this course that can assist with overcoming your selected shortcoming.

Remember your initial post on the main topic should be posted by Thursday 11:59 PM (EST). Your 2 following posts should be commenting on your classmates’ post on different days by Sunday 11:59 PM (EST). You should end the week with 3 total discussion posts.

A quality post is more than stating, “I agree with you.” Maybe you should state why you agree with your classmate’s post. Additionally, post some examples or find a related topic on the internet or University’s library and comment on it in the discussion post.

Reference: O’Reilly (2015, July 14). Using Storytelling to Effectively Communicate Data Tutorial | Aims Of Data Visualization. Retrieved from https://www.youtube.com/watch?v=3JWK5gRI9p0

research paper

 

Update your paper to address the course concepts that have been covered cin IT governance- as they are applicable to your specific industry, to your specific company.  

TIPS – Week 13 Research Paper: Milestone 3 Draft

Example:

•  Week 13Draft incorporating the required content (25 pts.)

1. Program and technology recommendations. This will include your comprehensive description of the industry, your annotated bibliography and the following:

2. Metrics

3. Data that matters to the executives in that industry, the roles for those executives, and some methods for getting this data into their hands.

4. Regulatory, security, and privacy compliance expectations for your company

5. Email and social media strategy

6. Cloud Computing strategy

System Hive

  

What would consider the most important data that could be extracted and used as evidence from the System Hive?

1) It should be a minimum of 300 Words not including references

2) APA Format and References needed

Applied Machine Learning

Total 21 question.

Have to use ANACONDA NAVIGATOR_under JUPYTER… 

DOWNLOAD LINK: 

https://www.anaconda.com/products/individual

Open Source (Free Individual)

I added two excel database sheets and .ipnyb folder.