you are asked to implement and test a program for cataloguing a collection of songs. Each song has the following details: Name of Band of Singer Name of Song Price Year of Release String String Floating point number Integer The program should carry out the following tasks: • Read in data from the standard input (keyboard) and save it appropriately organised in a file. • Retrieve from the file and print out data to the screen appropriately ordered the whole of available catalogue (e.g. Name of Band: XXXX, Name of Song YYYY, etc): The order should be according to Year of Release: Newer to Older. The User Interface of the program should be based on the following text based menu: The following options are available: Read in data [1] Print out catalogue to screen [2] Save data to file [3] Exit Program [4] Enter your choice now: After a task is performed the program should the User Interface and the user be probed for a new choice until Exit is requested. Programming hints: You could create a custom struct to hold the above details. You can use unformatted input to read in one line at a time into a string. This will allow you to read in names and titles with spaces, e.g. gets(str); to read characters from the standard input into a character array called str. Keep in mind that gets() does not let you specify a limit on how many characters are to be read so you must be careful with the size of the array pointed by str to avoid buffer overflows. You may also use foot c() although the usage differs from out ofl slightly
you are asked to implement and test a program for cataloguing a collection of songs. Each song has the following details: Name of Band of Singer Name of Song Price Year of Release String String Floating point number Integer The program should carry out the following tasks: • Read in data from the standard input (keyboard) and save it appropriately organised in a file. • Retrieve from the file and print out data to the screen appropriately ordered the whole of available catalogue (e.g. Name of Band: XXXX, Name of Song YYYY, etc): The order should be according to Year of Release: Newer to Older. The User Interface of the program should be based on the following text based menu: The following options are available: Read in data [1] Print out catalogue to screen [2] Save data to file [3] Exit Program [4] Enter your choice now: After a task is performed the program should the User Interface and the user be probed for a new choice until Exit is requested. Programming hints: You could create a custom struct to hold the above details. You can use unformatted input to read in one line at a time into a string. This will allow you to read in names and titles with spaces, e.g. gets(str); to read characters from the standard input into a character array called str. Keep in mind that gets() does not let you specify a limit on how many characters are to be read so you must be careful with the size of the array pointed by str to avoid buffer overflows. You may also use foot c() although the usage differs from out ofl slightly
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Please use C
![you are asked to implement and test a program for cataloguing a collection of songs. Each
song has the following details:
Name of Band of Singer
Name of Song
Price
Year of Release
String
String
Floating point number
Integer
The program should carry out the following tasks:
• Read in data from the standard input (keyboard) and save it appropriately
organised in a file.
• Retrieve from the file and print out data to the screen appropriately ordered the
whole of available catalogue (e.g. Name of Band: XXXX, Name of Song YYYY, etc): The
order should be according to Year of Release: Newer to Older.
The User Interface of the program should be based on the following text based
menu:
The following options are available:
Read in data [1]
Print out catalogue to screen [2]
Save data to file [3]
Exit Program [4]
Enter your choice now:
After a task is performed the program should the User Interface and the user be probed for a new
choice until Exit is requested.
Programming hints:
You could create a custom struct to hold the above details.
You can use unformatted input to read in one line at a time into a string. This will allow you to read
in names and titles with spaces, e.g.
gets(str);
to read characters from the standard input into a character array called str. Keep in mind that gets()
does not let you specify a limit on how many characters are to be read so you must be careful with
the size of the array pointed by str to avoid buffer overflows.
You may also use fgets() although the usage differs from gets() slightly.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F0bd9312a-553e-46e8-9536-e1baabd4a782%2Fb85f89c7-55f4-46b8-b85e-a97de18d95f6%2Fvqb120j_processed.png&w=3840&q=75)
Transcribed Image Text:you are asked to implement and test a program for cataloguing a collection of songs. Each
song has the following details:
Name of Band of Singer
Name of Song
Price
Year of Release
String
String
Floating point number
Integer
The program should carry out the following tasks:
• Read in data from the standard input (keyboard) and save it appropriately
organised in a file.
• Retrieve from the file and print out data to the screen appropriately ordered the
whole of available catalogue (e.g. Name of Band: XXXX, Name of Song YYYY, etc): The
order should be according to Year of Release: Newer to Older.
The User Interface of the program should be based on the following text based
menu:
The following options are available:
Read in data [1]
Print out catalogue to screen [2]
Save data to file [3]
Exit Program [4]
Enter your choice now:
After a task is performed the program should the User Interface and the user be probed for a new
choice until Exit is requested.
Programming hints:
You could create a custom struct to hold the above details.
You can use unformatted input to read in one line at a time into a string. This will allow you to read
in names and titles with spaces, e.g.
gets(str);
to read characters from the standard input into a character array called str. Keep in mind that gets()
does not let you specify a limit on how many characters are to be read so you must be careful with
the size of the array pointed by str to avoid buffer overflows.
You may also use fgets() although the usage differs from gets() slightly.
Expert Solution

Step 1
C code
Sample Output
Step by step
Solved in 2 steps with 12 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education