Prepare an output file with contents of your nested array

Assignment Help JAVA Programming
Reference no: EM132756097

Java Assignment -

Learning Objectives

Putting together a small project with input file and output file

If you choose Java, a review of Java concepts

- Java array type, and 2D arrays

- Creating classes, and instantiating them

Problem Description - A record label executive received text files that contain the top streamed music artists during certain weeks. In order for their in house IT to be able to process the information, they need someone to help process it.

Data Representation - Each file is a text file (data comes from SpotifyCharts.com) in comma separated value (CSV) format. It contains a list of records, line by line, column delimiters are written with a , symbol. Each record is one track by an artist (one track means one song). An artist's name might appear multiple times in a single file.

Each text file is a comma separated value (CSV) file that has a few columns like the following table. Each line in the text file represents one song.

Create a Report: Who appears on the top streamed list?

First, the exec wants to know which artists appears on the list and how many times they appear. Assuming you don't know any data structures yet, it seems the way to proceed to find the answer is with Java arrays.

1. Read in the text file and then save the fields into a nested Java array like myList below.

/* Java nested array syntax */

int cols = 4; // arbitrary number represents columns to create

int rows = 10; // arbitrary number represents rows to create;

String[][] myList = new String[rows][cols];

int[][] arr = { { 1, 2 }, { 3, 4 } };

System.out.println("arr[0][0] = " + arr[0][0]);

Will you limit to just the artist name? Perhaps you can discuss your decision with your class colleagues.

2. If an artist appears multiple times, then that artist probably should only appear once in your nested array.

3. Prepare an output file with contents of your nested array so that the record label executive can see this report.

Create a Report: Who appears on the top streamed list?

1. First, the exec wants to know which artists appears on the list and how many times they appear. Assuming you don't know any data structures yet, it seems the way to proceed to find the answer is with Java arrays.

1. Read in the text file and then save the fields into a nested Java array like myList below.

/* Java nested array syntax */

int cols = 4; // arbitrary number represents columns to create

int rows = 10; // arbitrary number represents rows to create;

String[][] myList = new String[rows][cols];

int[][] arr = { { 1, 2 }, { 3, 4 } };

System.out.println("arr[0][0] = " + arr[0][0]);

2. Prepare an output file with contents of your nested array so that the record label executive can see this report.

3. If an artist appears multiple times, then that artist probably should only appear once in your nested array.

4. Alphabetize the names of artists produced

5. Return list of artists produced

Reference no: EM132756097

Questions Cloud

Implement and analyse a data warehouse : Implement and analyse a Data Warehouse (DW) for Electronics For You, one of the biggest electronics store chains in NZ - Building and Analysing a DW
Compute and display the amount of energy consumed : Compute and display the amount of energy consumed by each allocation and Design and develop a new program to work with the two input data files.
How the principles of learning theory may be used to account : Post a brief description of the crimes you selected. Explain each crime by applying a specific learning theory, using a different theory for each.
Compare compliance and collaboration : Identify the health care professionals' role in compliance and give examples of ways in which the health care professional may actually contribute.
Prepare an output file with contents of your nested array : Prepare an output file with contents of your nested array so that the record label executive can see this report - Alphabetize the names of artists produced
Discuss the consequences of a failure to report : Discuss the consequences of a failure to report. Explain the impact his decision had on patient safety and organizational performance.
Investigate and explain the relevant issues in auditing : Investigate and explain the relevant issues in Auditing and Accounting raised by the case - Any problems, mistakes or misrepresentations made by the defendants
What are the consequences if not followed properly : Respond to the following in a minimum of 175 words: Why is it important to ensure proper exchange of electronic data? What are the consequences if not followed.
Evaluating the professional conduct of a nurse : Critical Analysis Essay of a Case Study - identify and summarise the professional practice issues in the case study from either a nursing or midwifery practice

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create a new variable according to the number

Create a new variable according to the number of inputted in the console - Since each of these values have to be stored

  Class to initialize values

Create a constructor that allows a user of the class to initialize values. Also create a method named SetJustSold()(Hint ++) that increments the number of hot dogs the stand has sold by one and should also increase the TotalSold by one

  Explain sequence of operations that you use to solve problem

Explain: 1) The sequence of operations that you use to solve the problem, and 2) Why this sequence of operations correctly solves the problem.

  Create listener objects for each jcombobox

Create listener objects for each JComboBox that set the background color of the panel when the user selects an integer. Use the current values supplied by the JComboBox objects to determine the background color.

  User for the name of a tennis player

Ask the user for the number of years the tennis player has played competitive tennis.Use this value as the size of a double array.

  Define both abstract methods inherited from disease class

Each of these classes extend the Disease class. Each of these class must define (override) both abstract methods inherited from disease

  Create a program that has an object type of contact

Create a program that has an object type of Contact. This contact will need to have the following attributes: Name, Birth Date, Phone Number, Address and Eye Color

  Balancing binary search trees

Balancing Binary Search Trees,  Consider the file BST.java (a link to this file is provided below for downloading purposes) which defines a generic Binary Search Tree class.

  Write a maze data type that can read in maze files

You will write a Maze data type that can read in .maze files, and print their out in the same format. A graph can represent a maze and there are many different ways to represent a graph in a computer program.

  Develop java package comprising of class using encapsulation

Develop the Java package comprising of Class and Student with the given requirements. Encapsulation, Method to print student details alone.

  A university has the following dormitories

A university has the following dormitories: Allen Hall $1,500 persemester Pike Hall $1,600 persemester

  What is a setter and what is a getter in java programming

What is a setter and what is a getter in java programming? Also what is an object and how do you use and create it? Please explain with simple examples.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd