Answer to Question #274042 in C++ for manu

Question #274042

Add two distances in inch-feet by creating a class named 'AddDistance'


1
Expert's answer
2021-12-04T20:55:49-0500
class AddDistance {
public:
  AddDistance(double a, double b): _a(a), _b(b) {}
  
  double apply() const { return _a + _b; }
  
private:
  double _a;
  double _b;
};

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment