Advertisement
candom

Untitled

Apr 14th, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. I. To compile an abstract template class AbstractCell - a descriptor of a cell;
  2. Articles (protected):
  3. int m_row; // order
  4. int m_col; // column
  5. T m_value; // value of any type
  6. Construction:
  7. - Understandable
  8. -Explicity
  9. Virtual Features:
  10. -Accessor / value mutant of any type
  11. virtual T getValue () const = 0;
  12. virtual void setValue (const T & value) = 0;
  13. II. To create a template class CCellDescr - descriptor of a table cell of any type,
  14. successor to AbstractCell.
  15. Public members:
  16. Construction:
  17. - Understandable
  18. -Explicity
  19. -Copping
  20. Features:
  21. getRow, getCol, T getValue ()
  22. void setValue (const T & value)
  23. Operator:
  24. -To discharge into a stream;
  25. III. To compile a template class CColumn, a successor to CCellDescr for
  26. a description of a column of data of any type;
  27. Private members:
  28. column name
  29. vector from CCellDescr
  30. Public member:
  31. static int m_iCounter - static variable consecutive counter
  32. Construction:
  33. - Understandable
  34. -Explicible (column name)
  35. Features:
  36. - Add a cell to the specified row
  37. - returns the value in the specified order
  38. - returns the vector size
  39. - returns the column name
  40. - static function to generate consecutive numbers
  41. Exceptions:
  42. When trying to access (add / read) beyond the dimension
  43. IV.Main function:
  44. 1. Create 2 CColumn objects for two types of data: string and int
  45. 2. Initializes the data in objects with random values โ€‹โ€‹of both types
  46. 3. Outputs information from the console output objects using the output operator.
  47. 4. Handles access errors
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement