evetsleep

Week 6 Discussion 2 - ConvertByte.h

Nov 16th, 2012
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. #ifndef CONVERTBYTE_H
  2. #define CONVERTBYTE_H
  3.  
  4. class ConvertByte
  5. {
  6. public:
  7.     //Defining the default constructor
  8.     ConvertByte();
  9.  
  10.     //Prompts the user to enter a value in MB.
  11.     void read();
  12.  
  13.     //Mutator which converts the value entered from MB
  14.     //into bytes.
  15.     void convert_to_byte();
  16.  
  17.     //Accessor which outputs the value that is stored
  18.     //in byte_result.
  19.     void print();
  20.  
  21.     //Destructor used to remove an object that was
  22.     //created.
  23.     ~ConvertByte();
  24.  
  25. private:
  26.     unsigned long int mb_private;
  27.     unsigned long int byte_result;
  28.     unsigned long int MB_in_bytes;
  29. };
  30.  
  31. #endif
Advertisement
Add Comment
Please, Sign In to add comment