CPP   17

calculator.h

Guest on 30th June 2022 02:27:36 AM

  1. //----------+----------+----------+----------+-----------
  2. // File Name: calculator.h
  3. // Author: Guruansh Singh
  4. // Notes: Definitions file for a calculator that computes some of two operands.
  5. //                       Auxillary file that helps demonstrate the usage of a Makefile.
  6. //      Adapted from an example in a previous offering of CS 260.
  7. //----------+----------+----------+----------+-----------
  8.  
  9. #ifndef __CALCULATOR_H_
  10. #define __CALCULATOR_H_
  11.  
  12. #include <iostream>
  13.  
  14. using namespace std;
  15.  
  16. class Calculator
  17. {
  18.         private:
  19.                 // Contains the first operand
  20.                 int x_;
  21.                 //Contains the second operand
  22.                 int y_;
  23.  
  24.         public:
  25.                 //Constructor
  26.                 Calculator(int, int);
  27.                 // Calculates the sum
  28.                 int Sum();
  29. };
  30.  
  31. #endif

Raw Paste


Login or Register to edit or fork this paste. It's free.