66 840
Assignments Done
99,1%
Successfully Done
In October 2018

Answer to Question #30817 in C++ for Jack

Question #30817
Define an array of 15 CStock elements.

#include <iostream>
#include <string>
using namespace std;

class CStock
{
public:
CStock(void);
CStock(string c_symbol; string c_company, double c_price);
~CStock(void);

double getPrice();
void setPrice(double c_price);

friend istream& operator >> (istream& input, CStock& C);
friend ostream& operator << (ostream& output, CStock& C);

string symbol;
string company;

private:
double price;
};
Expert's answer
#include <iostream>
#include <string>
using namespace std;

class CStock
{
public:
CStock(void);
CStock(string& c_symbol; string c_company, double c_price);
~CStock(void);

double getPrice();
void setPrice(double c_price);

friend istream& operator >> (istream& input, CStock& C);
friend ostream& operator << (ostream& output, CStock& C);

string symbol;
string company;

private:
double price;
};

Int main () {
//define array
CStock& array[15];
//end of the program
return 0;
}

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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions