I am a begginer in c++ and our teacher did start from the presumtion that we know C allready and jumped straight to advanced c++. Unfortunatly i do not know C and have trouble catching up. I mention that this is our 4th week and i got to do the folowing program:

Create a class that allows the creation of different document types: book, CV, article. Each
document type is described by the section that must be included in it. (e.g. For Article:
introduction, state of the art, results, conclusion sections).

I do not ask for anyone to do my homework, but to point me in the right dirrection. At the last HW spent 20 hours and took 4/10.

Thank you

Recommended Answers

All 7 Replies

Unfortunatly i do not know C

C is not really a prerequisit for learning c++ unless your instructor and school says it is.

The requirements you posted for the program are pretty vague. Is that all the info you were given?

Do you know ANY object oriented languages? If so, this should not be an issue (you just need to learn the new syntax). If C++ is your first language ever and you have not learned the basics, you need to explain that to your instructor. Four weeks is probably enough time to have gotten to class/object creation if you were comfortable with the basics.

Hello

No prevoious language. I come from an web design background. However the question was if anyone undestands what to be done in the given exercise. As with the teacher i will have a chat.

CV

What's that? > book, CV, article.

CV as Curriculum Vitae or in states as Resume.

Very vague instructions in the posted link. The best thing to do is to try to get better description of the problem. Alternatively, you could conceivably consider declaring a document class which has member variables such as author, date of creation, date of edit, or whatever. Then you can declare classes for each type of document such as Book, CV (presumably Curriculum Vitae, but who knows for sure), and article, each of which derives from the document class. In addition to all the member variables in a document each class has it's own specialized members. For a book object it might be number of pages, date of copywrite, topic, library of congress number, etc. For CV it might be different sections such as a list of schools, a list of jobs with description, etc. For an article it could be introduction, state of the art, results, conclusion sections, etc. Each class should be able to print/display itself. If you have learned about function overloading with the keyword virtual, that that functionality could be utilized and you could demonstrate how to create a container of various document types and display their contents using a single loop. All of this is speculative, however. Get further/better instructions from your instructor.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.