[CS 171] - Final Exam Guide - Everything you need to know! (50 pages long)

496 views50 pages

Document Summary

Having two sets of these variables suggests that a common concept is lurking just under the surface: each of these two sets of variables describes a product. When using getline(input), you do not need to use cin >>. The getline function reads an entire line of input, including the newline character at the end of the line and puts those characters except for the newline character into a string variable. Every class has a public interface: a collection of member functions through which the objects of the class can be manipulated. The public interface must be defined for a class first and foremost. Interface of the product class consists of all functions that are wanted to apply to product objects. Need to be able to: make a new product object, read in a product object. 2: compare two products and find out which one is better, print a product.