Question: Write code for a class Counting that has a variable count that starts at 0. The class has a function addref which adds 1 to
Write code for a class Counting that has a variable count that starts at 0. The class has a function addref which adds 1 to count and removeref that removes 1 from count.
Show what the code for a class Hascount which derives from Counting would look like. Hascount has a function printInitials which prints your initials. Show main creating a Hascount object and calling addref and printInitials. Write the UML class diagrams for both classes.
C++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
