Introduction - If you have any usage issues, please Google them yourself
5.16 Creating a Fraction class perform fractional arithmetic. Requirements are as follows: (1) the number of plastic surgery, said private member variables of the class: f1 (numerator), f2 (denominator) (2) provide a constructor, passing two integers requirements, initialize the numerator and denominator (3) provides two scores are added, subtracted, multiplied, methods other and (4) provide a/b on the printed score (5) provided in the form of print float fraction (6) the preparation of test scores for each test class method class . 5.18 The following simple programming supermarket management, specific requirements are as follows: (1) the class is implemented as class Suppermacket supermarket, with shelves property recording system existing products, check the function definition merchandise inventory (inventory number of various types of goods, and the output inventory results), the function of commodities query query and display the query results (2) the definition of commodity