Java playlist program. All the necessary information are on the pictures. The PlayList Project This assignment requires
Fantastic news! We've Found the answer you've been seeking!
Question:
Java playlist program. All the necessary information are on the pictures.
Transcribed Image Text:
The PlayList Project This assignment requires you to design a class that mimics the creation and use of a playlist for an mp3 player. The class will provide the capability to create a playlist by having the user enter playlist information from the keyboard, writing the playlist file (playlist.txt) to disk, reading the file from disk, and printing the read file on the screen. Your class needs to meet the following criteria and include the following methods: 1. All methods, including the main () method will be contained in a single class file. 2. The file name of the text file, for both writing and reading is to be "playlist.txt". 3. No constructors need to be used, methods can all be static. 4. The following methods: A method makeList (String array[]) which does the following: Prompts the user to enter the song title, artist name, and a rating (from 1 through 5) for each entry on the list. . ● ● Assigns the concatenated string to an array element. Each element represents a list item, and the array represents the playlist. • Calls printFile () to print each element of the array to the screen. A method writeFile (String array []) which does the following: Writes each element of the array to the playlist.txt file as a separate line in the file. Once the file has been written, calls print File () to print each element of the array to the screen.. . . A method readFile () which does the following: Calls a private helper method get NumLines () which reads the number of lines stored in the playlist.txt file (see below for more information). Reads each line of the playlist.txt file and assigns the line to an array element. Calls printFile() to print each element of the array to the screen. . . Concatenates the song title, artist name, and rating strings together separating each item by a comma (a comma delimited line of text). A method get NumLines () which does the following: Functions as a helper method to readFile(). Reads the number of lines in the playlist.txt file and returns that integer to the calling method or variable. . . . Uses a FileReader object wrapped by a BufferedReader object to facilitate the counting of lines. Returns an integer value to readFile () (or any other calling method or variable) representing the number of lines in the existing text file to be read. A printFile (String array[]) whose function is to print the playlist entries assigned to an array. The PlayList Project This assignment requires you to design a class that mimics the creation and use of a playlist for an mp3 player. The class will provide the capability to create a playlist by having the user enter playlist information from the keyboard, writing the playlist file (playlist.txt) to disk, reading the file from disk, and printing the read file on the screen. Your class needs to meet the following criteria and include the following methods: 1. All methods, including the main () method will be contained in a single class file. 2. The file name of the text file, for both writing and reading is to be "playlist.txt". 3. No constructors need to be used, methods can all be static. 4. The following methods: A method makeList (String array[]) which does the following: Prompts the user to enter the song title, artist name, and a rating (from 1 through 5) for each entry on the list. . ● ● Assigns the concatenated string to an array element. Each element represents a list item, and the array represents the playlist. • Calls printFile () to print each element of the array to the screen. A method writeFile (String array []) which does the following: Writes each element of the array to the playlist.txt file as a separate line in the file. Once the file has been written, calls print File () to print each element of the array to the screen.. . . A method readFile () which does the following: Calls a private helper method get NumLines () which reads the number of lines stored in the playlist.txt file (see below for more information). Reads each line of the playlist.txt file and assigns the line to an array element. Calls printFile() to print each element of the array to the screen. . . Concatenates the song title, artist name, and rating strings together separating each item by a comma (a comma delimited line of text). A method get NumLines () which does the following: Functions as a helper method to readFile(). Reads the number of lines in the playlist.txt file and returns that integer to the calling method or variable. . . . Uses a FileReader object wrapped by a BufferedReader object to facilitate the counting of lines. Returns an integer value to readFile () (or any other calling method or variable) representing the number of lines in the existing text file to be read. A printFile (String array[]) whose function is to print the playlist entries assigned to an array.
Expert Answer:
Answer rating: 100% (QA)
import javaio public class PlaylistManager public static void mainString args String playlist new String100 Max 100 songs for simplicity int choice do ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
What am I required to do in this assignment? Shared Power is an information system to help tradesmen share expensive and specialist tools rather than buying them themselves. Registered owners add...
-
For this assignment, you will need to copy the excel file provided in Project Assignment 1 into your UMSystem Office365 OneDrive. You should have been prompted to do so when you clicked on the link...
-
The total cost of 2 chair and 1 table is 210 dollars. The total cost of 1 chair and 2 tables is 285 dollars. What is the cost of 1 chair?
-
A furniture manufacturer is currently using manufacturer's representatives to sell its line of living room furniture. These representatives receive an 8 percent commission. The company is considering...
-
State the nature of accounting information required by long-term lenders.
-
Solve the general logistic problem, \[\begin{equation*} \frac{d y}{d t}=k y-c y^{2}, \quad y(0)=y_{0} \tag{4.86} \end{equation*}\] using separation of variables. 0.6 0.4 0.2 0 -0.2 -0.4 Nonlinear...
-
Presented below is an aging schedule for Halleran Company. At December 31, 2014, the unadjusted balance in Allowance for Doubtful Accounts is a credit of $12,000. Instructions (a) Journalize and post...
-
a Record the events under the accounting equation Cash + Land = Creditors + Stockholders Equity 1 $ 24.000 10,000 14,000 2 $ (7,500) 7,500 Balance $ 16.500 $ 7,500 10,000 14,000 b) After all events...
-
Chumpy Lighting Limited manufactures a wide variety of light bulbs which it sells to lighting shops and builders merchants through wholesale distributors. It also sells direct to the big UK...
-
A flight from X ( 1 6 2 1 5 W ) to Y ( 1 4 8 3 0 E ) is planned to leave at 2 2 4 5 LMT on 1 8 th February. If the flight time is 8 hours 2 5 minutes, give the LMT and local date of arrival at Y ?
-
Enhanced connectivity and information accessibility through IT have permitted any information, at anytime, anywhere, and any way one wants to look at its philosophy in a cost-effective manner. Citing...
-
Consider a neutral metal sphere on an insulating stand. If the sphere is charged to 79.5 nC by adding electrons, how much did the mass of the metal sphere change? Calculate the answer in kg and make...
-
Perform the indicated operations. Express your answer in reduced form. 9 2 (x-5)(x + 1) x-5
-
An airplane propeller is 1.88 m in length (from tip to tip) with mass 115 kg and is rotating at 2300 rpm (rev/min) about an axis through its center. You can model the propeller as a slender rod. (a)...
-
Assignment Steps: 1. Download data file AT Data Job GP. 2. Double left-click on Tableau icon to open it. 3. Left-click on Microsoft Excel in the blue Connect pane on left-hand side to show data...
-
Question 1 Explain what safety margin is and how safety margin is used in decision making? Question 2 The Longhorn Company has four departments in its factory with two service departments, S1 and S2,...
-
Jax Incorporated reports the following data for its only product. The company had no beginning finished goods inventory and it uses absorption costing. $ 57.30 per unit $ 10.30 per unit $ 7.80 per...
-
Use any test to determine whether the series is absolutely convergent, conditionally convergent, or divergent. (-9)" n=1 n10"+1
-
The contour map shows the temperature, in degrees Fahrenheit, at 4:00 pm on February 26, 2007, in Colorado. (The state measures 388 mi west to east and 276 mi south to north.) Use the Midpoint Rule...
-
Verify that the function satisfies the three hypotheses of Rolles Theorem on the given interval. Then find all numbers c that satisfy the conclusion of Rolles Theorem. f(x) x 3 - 2x 2 - 4x + 2, [22,...
-
Correctly apply the order of operations to compute the following: \(13+3^{4} \times 8 / 6 \times 5^{2}-3 \times 4\)
-
Banks and credit cards often base their interest on the average daily balance of an account, which is the average of the balance from each day of the period. The account balance of Jada's checking...
-
Use your calculator to calculate (-77)/(-11). Explain how the answer agrees with what was expected.
Study smarter with the SolutionInn App