Advertisement
Guest User

Untitled

a guest
Dec 12th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. //Lab #8 - HardwareData.cpp
  2.  
  3. #include <string>
  4. #include <iostream>
  5. #include "HardwareData.h"
  6.  
  7. using namespace std;
  8.  
  9. //Default constructor
  10. HardwareData::HardwareData()
  11. : recordNumber(0), quantity(0), cost(0), toolName("") {}
  12.  
  13. //Get and set functions
  14. //Record number
  15. int HardwareData::getRecordNumber() const {return recordNumber;}
  16. void HardwareData::setRecordNumber(int recordNumberValue) {recordNumber = recordNumberValue;}
  17.  
  18. //Tool name
  19. string HardwareData::getToolName() const {cout << toolName; return toolName;}
  20. void HardwareData::setToolName(string toolNameValue) {toolName = toolNameValue; cout << toolName;}
  21.  
  22. //Quantity
  23. int HardwareData::getQuantity() const {return quantity;}
  24. void HardwareData::setQuantity(int quantityValue) {quantity = quantityValue;}
  25.  
  26. //Cost
  27. double HardwareData::getCost() const {return cost;}
  28. void HardwareData::setCost(double costValue) {cost = costValue;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement