Explore BrainMass
Share

C++ code for calculating revenue

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

Define a class called Revenue that has 2 private members of demand and price. Include a constructor and a public function that calculates the RevenueValue of the class. RevenueValue = demand * price
Use public functions of the class in a program that computes RevenueValue and displays RevenueValue when demand is 2000 and price is 2.

© BrainMass Inc. brainmass.com October 16, 2018, 1:37 am ad1c9bdddf - https://brainmass.com/computer-science/cpp/566880

Solution Preview

#include<iostream>
using namespace std;

class Revenue {
private:
int demand;
int ...

Solution Summary

The solution gives a complete C++ code for calculating revenue that has 2 private members of demand and price.

$2.19