Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a command-line utility called cddb to maintain a flat-file database of album information. You will allow the user to view album info, add a

Write a command-line utility called cddb to maintain a flat-file database of album information. You will allow the user to view album info, add a new entry, or delete an entry, where each entry is an album w/all of the track information, as follows:

Options, and Descriptions

-l List album

Display an enumerated, alphabetical list of artists

You will allow the user to choose an artist by entering the number, or to quit by entering a q

You will then list all albums, by release date, enumerated

Allow the user to choose an album, by #, or return to the menu above (artists) by entering a

If an album is entered, list all songs in that album, by track order. Prompt for input to return to the previous (i.e., the album) menu

-d Delete album. Similar to above, display menus allowing a user to choose an album to delete

-a Add album. You'll prompt for artist, album name, release date, and finally the track list. You may assume that they are entered in track order. You'll want to check that the album doesn't already exist before adding it

-h Show usage msg and quit

You may assume that all names are entered exactly. That is, do not worry about inconsistencies in spelling or capitalisation. E.g., Led Zeppelin, LedZeppelin, and led zeppelin are 3 different groups for this assignment.

If no argument is supplied, a bad argument is supplied, or multiple arguments, print a usage message and exit.

File Format

Album information will be stored in a flat file w/the format shown in sample.db:

To simplify things, the filename (location of the DB) will be stored in an exported environment variable, $CDDB .

Target Language

You can do this in any language you choose, including Bash or AWK. The language must be currently hosted on the tux machines.

If you, e.g., do this in Java, then you'll need to supply a shell script called cddb that invokes your program, the JRE, whatever, w/the arguments.

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

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

2 What are the key barriers to implementing HRM?

Answered: 1 week ago