Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need guidance on formulating this program. let me know if you need to reference the lab 6 song class CSC 212 -Principles of Programming

image text in transcribed

image text in transcribed

I need guidance on formulating this program. let me know if you need to reference the lab 6 song class

CSC 212 -Principles of Programming Homework Assignment 5 Write a Java program that can read a comma-separated value (CSV) file containing information about songs, store these in an array of song objects, and perform search functions. The file can be found here Save this file in the main directory for your Netbeans project, as you did for Lab 5. The example below shows the interaction. Desian Make sure that your program uses a Java package called 'csc212hw05'. Your program should consist of the following classes. Main . Read a file called "songs.csv" containing 4456 songs. Use each line of the file to create a Song object, then place it in an array of Song objects o Note: You should declare your array to hold exactly 4456 Song objects. o Hint: Use the split method in the string class to split the input line on the comma. The result is a small array with the artist, title, and year as elements . Read input from the user to get search commands. Hint: When searching, use a for loop to iterate through the array of Song objects Hint: Use the indexof) method in the string class to do partial matching on the title and artist o o Process commands as shown in the example Song Very similar to the Song class used in Lab 6, except that we will add a String variable called year. All variables should be declared as private Write a constructor that accepts three parameters: a String for the artist, a String for the title, and a String for the year and uses these to initialize the variables. Write the following public methods . . o getTitle the song o getArtist accepts no parameters. The method should return the title of accepts no parameters. The method should return the artist performing the song. o toString -accepts no parameters. It returns the artist, title, and year concatenated as shown in the example below

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

What is the education level of your target public?

Answered: 1 week ago

Question

What advertising media and promotional tactics will you use?

Answered: 1 week ago