Dev - C ++ - doubt in exercise C ++

The purpose of this system is to keep collectible items (books, CDs, DVDs and magazines), organized by type. The system should allow recording of common and specific data for each type of item. Common data are: unique identification, name, year, price and status. For books it is also important to keep the name of the publisher and the year of publication. As for CDs, it is interesting to keep the musical genre and the identification of the audio tracks (song names). For DVDs it is important to store the type (musical, film or data), and a general description about the item or extras, for example. Finally, of the magazines it is interesting to keep the year of publication, the volume, the publisher and the main subjects dealt with.
The status attribute will have a note about the collectible, and the following rules must be observed:

The system should allow printing of a list of each collectible type. It must also allow searches for specific items of each type. For example, from magazines it is interesting to research about the subjects it addresses, as the search for “object-oriented programming” could show the user a list of all the magazines that deal with this subject. It must allow the consultation of a specific item by identifying it.
Always at the end of the listings, the total value of the listed items must be informed.
Make a set of classes that make it possible to manage at least 2 of the collectible types presented in the text.
This is not a homework site. We won't do your homework for you. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.

We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again. As it is impossible to find derivative of function without knowledge in arithmetic, you cannot do more complex tasks in programming without clear understanding of basics
First, design the program before writing one line of code. What input/output, what file(s) if any are used, what structs/classes are required? What processing is required? What menu(s) are needed? What functions are needed? What is the overall control loop? How do users interact? etc etc etc.

Once you have a design, then you start coding from the design.
For me, it's always easiest to start with the data. Read the assignment and get a sense of what classes you might need.

Now read it again and make a first draft of the classes and the data that must go in them.

Read it again and identify the code methods that you'll need in the classes.

Repeat as many times as needed. Refine the data and methods as needed (i.e., the type of data, the arguments and return values of the methods, etc.). Don't get discouraged if you find that you went down the wrong path and have to redo some parts. It's all part of the design process.

You should get to the point where you can read the entire assignment and understand which part of your design covers each and every word in the assignment.

Now write the code. Test it as you go. If you do this right, you should be able to start with a system that handles 2 of the collectible types. When it's working with two, adding others should be easy.

If you get stuck for more than 30-60 minutes, post your code here and explain what's wrong. Don't pound your head against a problem for hours. There's probably a simple answer that you're just not seeing and your time would be more productively spent doing almost anything else.
Registered users can post here. Sign in or register to post.