All pastes #413887 Raw Edit

Someone

public text v1 · immutable
#413887 ·published 2007-03-28 19:19 UTC
rendered paste body
class Automobile:public Vehicle
{
private: 
	double trunk_capacity;
public:
	void settrunk_capacity(double tc){trunk_capacity=tc;)
	double gettrunk_capacity()const{return trunk_capacity;}

friend ostream& operator<< (ostream, const Automobile&);
friend istream& operator<< (istream, Automobile&);

};
istream& operator>> (istream& input, Automobile& A)
{
        cout << "Automobile:" << endl;
        cout << "Enter the number of wheels and the engine horsepower >>> ";
        input >> A.wheels >> A.horsepower;
		cout<<	"Enter the gross vehicle weight and vehicle fuel capacity >>> ";
		input >> A.weight >> A.fuel_tank_capacity;
		input << static_cast<Vehicle> (A);

		return input;
}