>> classicVinyls.cpp For the following program, you will use the text file called “vinyls.txt” attached to this assignment. The file stores information about a collection of classic vinyls. The records in the file are like the ones on the following sample: Led_Zeppelin                 Led_Zeppelin                 1969                                          1000.00 The_Prettiest_Star          David_Bowie                  1973                                          2000.00 Speedway                      Elvis_Presley                   1968                                          5000.00 Spirit_in_the_Night        Bruce_Springsteen         1973                                          5000.00 …   Write a declaration for a structure named vinylRec that is to be used to store the records for the classic collection system.  The fields in the record should include a title (string), an artist (string), the yearReleased (int), and an estimatedPrice(double). Create the following functions: void ReadData(vinylRec vinylArr[], int& n) should accept an array of type vinylRec and the number of vinyls read in (n).  The function should read in all the records from the file “vinyls.txt” and store them in the array of vinylRecs. It should update the reference parameter n, with the number of records read. Note: For simplicity purposes, you may assume the string elements do not include whitespaces.  void DisplayRecords(vinylRec vinylArr [], int n) should accept an array of vinylRecs and the number of records to display(n).  The function should display the title, artist and price of the first n records in the array. Note: Use manipulators to format output table. Display prices using a $ sign and 2 decimal places of precision. int priceCount(vinylRec vinylArr [], int n) should accept an array of vinylRecs and the number of records to consider (n).  The function should prompt the user for a price and return the number of vinyls whose estimated price is greater than or equal to the number entered. Input Validation – No negative amounts should be accepted. Test your functions as follows in main():  Declare an array of vinylRecs of size 50 called vinyls.    Use the following menu to drive your program:               1)  See data               2)  Quit If the user chooses (1), proceed as follows: Use the function ReadData() to read in the vinyl records from the file “vinyls.txt”.  Use the function DisplayRecords()  to produce a report showing the Title, Artist & Estimated Price of the records read. Use the function priceCount() to display the number of records whose price is greater than or equal to the amount entered by the user.  If the user chooses (2), end the program.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

>> classicVinyls.cpp

For the following program, you will use the text file called “vinyls.txt” attached to this assignment. The file stores information about a collection of classic vinyls.

The records in the file are like the ones on the following sample:

Led_Zeppelin                 Led_Zeppelin                 1969                                          1000.00

The_Prettiest_Star          David_Bowie                  1973                                          2000.00

Speedway                      Elvis_Presley                   1968                                          5000.00

Spirit_in_the_Night        Bruce_Springsteen         1973                                          5000.00

  1.  

Write a declaration for a structure named vinylRec that is to be used to store the records for the classic collection system. 
The fields in the record should include a title (string), an artist (string), the yearReleased (int), and an estimatedPrice(double).

  1. Create the following functions:
  • void ReadData(vinylRec vinylArr[], int& n) should accept an array of type vinylRec and the number of vinyls read in (n). 
    The function should read in all the records from the file “vinyls.txt” and store them in the array of vinylRecs. It should update the reference parameter n, with the number of records read.

    Note: For simplicity purposes, you may assume the string elements do not include whitespaces.
  •  void DisplayRecords(vinylRec vinylArr [], int n) should accept an array of vinylRecs and the number of records to display(n). 
    The function should display the title, artist and price of the first n records in the array.

    Note: Use manipulators to format output table. Display prices using a $ sign and 2 decimal places of precision.
  • int priceCount(vinylRec vinylArr [], int n) should accept an array of vinylRecs and the number of records to consider (n). 
    The function should prompt the user for a price and return the number of vinyls whose estimated price is greater than or equal to the number entered.
    Input Validation – No negative amounts should be accepted.
  1. Test your functions as follows in main():
    1.  Declare an array of vinylRecs of size 50 called vinyls.

 

    1.  Use the following menu to drive your program:

              1)  See data

              2)  Quit

  • If the user chooses (1), proceed as follows:
    • Use the function ReadData() to read in the vinyl records from the file “vinyls.txt”. 
    • Use the function DisplayRecords()  to produce a report showing the Title, Artist & Estimated Price of the records read.
    • Use the function priceCount() to display the number of records whose price is greater than or equal to the amount entered by the user. 
  • If the user chooses (2), end the program.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY