C++ ONLY PLEASE Assignment 7 A: Rare Collection. We can make arrays of custom objects just like we’ve done with ints and strings. While it’s possible to make both 1D and 2D arrays of objects (and more), for this assignment we’ll start you out with just one dimensional arrays. Your parents have asked you to develop a program to help them organize the collection of rare CDs they currently have sitting in their car’s glove box. To do this, you will first create an AudioCD class. It should have the following private attributes.  String cdTitle  String[4] artists  int releaseYear  String genre  float condition Your class should also have the following methods:  Default Constructor: Initializes the five attributes to the following default values: ◦ cdTitle = “” ◦ artists = {“”, “”, “”, “”} ◦ releaseYear = 1980 ◦ genre = “” ◦ condition = 0.0  Overloaded Constructor: Initializes the five attributes based on values passed into the formal parameters ◦ If condition is less than 0.0 or greater than 5.0, set it equal to 0.0 ◦ If releaseYear is less than 1980, set it equal to 1980 ◦ Print message if the parameter’s artist array size is greater than 4, and only store the first four values  Getter method for all class attributes You will then create a separate class, Assignment7A. In its main method, you should do the following:  Ask the user how many Audio CDs are in their collection  Create an array (of type AudioCD) of that size  Use a loop to ask the user to enter information for all CDs ◦ Create a AudioCD object for each Audio CD and store it in the next index in the array Then using another loop, you should give the user the following options:  Print Audio CD information ◦ This should ask the user for a number, and then print the information from the AudioCD object at that index using a custom toString() method. If the index is out of bounds, it should notify the user instead.  Search for an Audio CD from the collection ◦ This should ask the user for an Audio CD name, then search the array for an Audio CD with that name (case insensitive). If it exists in the array, then it should print the same information about the Audio CD as in the prior point (Hint: Could you make a method to simplify this process?). If it does not exist in the array, notify the user.  Search for an artist from the collection ◦ This should ask the user for an artist name, then search the array for an Audio CD by that artist (case insensitive). Print all the Audio CDs that the artist worked on in the collection. If they are not in the array, notify the user.  Quit ◦ Ends the loop and 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

C++ ONLY PLEASE

Assignment 7 A: Rare Collection. We can make arrays of custom objects just like we’ve done with ints and strings. While it’s possible to make both 1D and 2D arrays of objects (and more), for this assignment we’ll start you out with just one dimensional arrays. Your parents have asked you to develop a program to help them organize the collection of rare CDs they currently have sitting in their car’s glove box. To do this, you will first create an AudioCD class. It should have the following private attributes.  String cdTitle  String[4] artists  int releaseYear  String genre  float condition Your class should also have the following methods:  Default Constructor: Initializes the five attributes to the following default values: ◦ cdTitle = “” ◦ artists = {“”, “”, “”, “”} ◦ releaseYear = 1980 ◦ genre = “” ◦ condition = 0.0  Overloaded Constructor: Initializes the five attributes based on values passed into the formal parameters ◦ If condition is less than 0.0 or greater than 5.0, set it equal to 0.0 ◦ If releaseYear is less than 1980, set it equal to 1980 ◦ Print message if the parameter’s artist array size is greater than 4, and only store the first four values  Getter method for all class attributes You will then create a separate class, Assignment7A. In its main method, you should do the following:  Ask the user how many Audio CDs are in their collection  Create an array (of type AudioCD) of that size  Use a loop to ask the user to enter information for all CDs ◦ Create a AudioCD object for each Audio CD and store it in the next index in the array Then using another loop, you should give the user the following options:  Print Audio CD information ◦ This should ask the user for a number, and then print the information from the AudioCD object at that index using a custom toString() method. If the index is out of bounds, it should notify the user instead.  Search for an Audio CD from the collection ◦ This should ask the user for an Audio CD name, then search the array for an Audio CD with that name (case insensitive). If it exists in the array, then it should print the same information about the Audio CD as in the prior point (Hint: Could you make a method to simplify this process?). If it does not exist in the array, notify the user.  Search for an artist from the collection ◦ This should ask the user for an artist name, then search the array for an Audio CD by that artist (case insensitive). Print all the Audio CDs that the artist worked on in the collection. If they are not in the array, notify the user.  Quit ◦ Ends the loop and the program

Example output

[Rate Audio CD Collection] How many CDs do you have lying around your car? 8 CD #1: *Enter Title: Back to the Future: Music from the Motion Picture Soundtrack *Enter Artists (type -1 when finished): Huey Lewis and the News Lindsey Buckingham Alan Silvestri Chuck Berry -1 *Enter Genre: Pop Rock *Enter Release Year: 1985 *Enter Condition: 4.8 CD #2: *Enter Title: Batman (Soundtrack) *Enter Artists (type -1 when finished): Prince Sheena Easton Eric Leeds and the Atlanta Bliss -1 *Enter Genre: Rock, Funk, Pop *Enter Release Year: 1989 *Enter Condition: 2.4 //Keep going for all 8 CDs (THIS IS NOT PART OF THE OUTPUT) [Main Menu] 1) Album Info 2) Find a CD 3) Find an artist 4) Log off Choice: 1 Which CD do you want? 100 Sorry, there’s no CD that matches the criteria. [Main Menu] 1) Album Info 2) Find a CD 3) Find an artist 4) Log off Choice: 1 Which CD do you want? 1 1. Batman (Soundtrack), 1989 Artist (#1): Prince Artist (#2): Sheena Easton Artist (#3): Eric Leeds and the Atlanta Bliss Genre: Rock, Funk Pop Condition: 2.4 [Main Menu] 1) Album Info 2) Find a CD 3) Find an artist 4) Log off Choice: 2 What is the CD’s name? Batman There is a match! 1. Batman (Soundtrack), 1989 Artist (#1): Prince Artist (#2): Sheena Easton Artist (#3): Eric Leeds and the Atlanta Bliss Genre: Rock, Funk Pop Condition: 2.4 [Main Menu] 1) Album Info 2) Find a CD 3) Find an artist 4) Log off Choice: 3 What artist are you looking for? Chuck Berry 2 CD(s) found! CD: Back to the Future: Music from the Motion Picture Soundtrack CD: Johnny B. Goode [Main Menu] 1) Album Info 2) Find a CD 3) Find an artist 4) Log off Choice: 4 Goodbye!

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

C++ ONLY PLEASE, and please read carefully, i have had people submit wrong answers

Assignment 7 A: Rare Collection. We can make arrays of custom objects just like we’ve done with ints and strings. While it’s possible to make both 1D and 2D arrays of objects (and more), for this assignment we’ll start you out with just one dimensional arrays. Your parents have asked you to develop a program to help them organize the collection of rare CDs they currently have sitting in their car’s glove box. To do this, you will first create an AudioCD class. It should have the following private attributes.  String cdTitle  String[4] artists  int releaseYear  String genre  float condition Your class should also have the following methods:  Default Constructor: Initializes the five attributes to the following default values: ◦ cdTitle = “” ◦ artists = {“”, “”, “”, “”} ◦ releaseYear = 1980 ◦ genre = “” ◦ condition = 0.0  Overloaded Constructor: Initializes the five attributes based on values passed into the formal parameters ◦ If condition is less than 0.0 or greater than 5.0, set it equal to 0.0 ◦ If releaseYear is less than 1980, set it equal to 1980 ◦ Print message if the parameter’s artist array size is greater than 4, and only store the first four values  Getter method for all class attributes You will then create a separate class, Assignment7A. In its main method, you should do the following:  Ask the user how many Audio CDs are in their collection  Create an array (of type AudioCD) of that size  Use a loop to ask the user to enter information for all CDs ◦ Create a AudioCD object for each Audio CD and store it in the next index in the array Then using another loop, you should give the user the following options:  Print Audio CD information ◦ This should ask the user for a number, and then print the information from the AudioCD object at that index using a custom toString() method. If the index is out of bounds, it should notify the user instead.  Search for an Audio CD from the collection ◦ This should ask the user for an Audio CD name, then search the array for an Audio CD with that name (case insensitive). If it exists in the array, then it should print the same information about the Audio CD as in the prior point (Hint: Could you make a method to simplify this process?). If it does not exist in the array, notify the user.  Search for an artist from the collection ◦ This should ask the user for an artist name, then search the array for an Audio CD by that artist (case insensitive). Print all the Audio CDs that the artist worked on in the collection. If they are not in the array, notify the user.  Quit ◦ Ends the loop and the program

Example output

[Rate Audio CD Collection] How many CDs do you have lying around your car? 8 CD #1: *Enter Title: Back to the Future: Music from the Motion Picture Soundtrack *Enter Artists (type -1 when finished): Huey Lewis and the News Lindsey Buckingham Alan Silvestri Chuck Berry -1 *Enter Genre: Pop Rock *Enter Release Year: 1985 *Enter Condition: 4.8 CD #2: *Enter Title: Batman (Soundtrack) *Enter Artists (type -1 when finished): Prince Sheena Easton Eric Leeds and the Atlanta Bliss -1 *Enter Genre: Rock, Funk, Pop *Enter Release Year: 1989 *Enter Condition: 2.4 //Keep going for all 8 CDs (THIS IS NOT PART OF THE OUTPUT) [Main Menu] 1) Album Info 2) Find a CD 3) Find an artist 4) Log off Choice: 1 Which CD do you want? 100 Sorry, there’s no CD that matches the criteria. [Main Menu] 1) Album Info 2) Find a CD 3) Find an artist 4) Log off Choice: 1 Which CD do you want? 1 1. Batman (Soundtrack), 1989 Artist (#1): Prince Artist (#2): Sheena Easton Artist (#3): Eric Leeds and the Atlanta Bliss Genre: Rock, Funk Pop Condition: 2.4 [Main Menu] 1) Album Info 2) Find a CD 3) Find an artist 4) Log off Choice: 2 What is the CD’s name? Batman There is a match! 1. Batman (Soundtrack), 1989 Artist (#1): Prince Artist (#2): Sheena Easton Artist (#3): Eric Leeds and the Atlanta Bliss Genre: Rock, Funk Pop Condition: 2.4 [Main Menu] 1) Album Info 2) Find a CD 3) Find an artist 4) Log off Choice: 3 What artist are you looking for? Chuck Berry 2 CD(s) found! CD: Back to the Future: Music from the Motion Picture Soundtrack CD: Johnny B. Goode [Main Menu] 1) Album Info 2) Find a CD 3) Find an artist 4) Log off Choice: 4 Goodbye!

Solution
Bartleby Expert
SEE SOLUTION
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