Skip to Main Content
C++ Primer Plus, Fourth Edition
book

C++ Primer Plus, Fourth Edition

by Stephen Prata
November 2001
Beginner content levelBeginner
1128 pages
29h 12m
English
Sams
Content preview from C++ Primer Plus, Fourth Edition

Programming Exercises

1:The Wine class has a String class object (Chapter 12) holding the name of a wine and ArrayDb class object (this chapter) of Pair objects (this chapter), with each Pair element holding a vintage year and the number of bottles for that year. For example, a Pair might contain the value 1990 for the year and 38 for the number of bottles. Implement the Wine class using containment and test it with a simple program. The program should prompt you to enter a wine name, the number of elements of the array, and the year and bottle count information for each array element. The program should use this data to construct a Wine object, then display the information stored in the object.
2:The Wine class has a String class object (Chapter ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C++ Primer Plus, Fifth Edition

C++ Primer Plus, Fifth Edition

Stephen Prata
C++ All-In-One For Dummies®, 2nd Edition

C++ All-In-One For Dummies®, 2nd Edition

John Paul Mueller, Jeff Cogswell
C++ Primer Plus

C++ Primer Plus

Stephen Prata

Publisher Resources

ISBN: 0672322234Purchase book