>> 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.
>> 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.

Trending now
This is a popular solution!
Step by step
Solved in 2 steps









