单选题 1分

有如下程序:#include <iostream>using namespace std;class Goods{ //货物类 ...

有如下程序:
#include <iostream>
using namespace std;
class Goods{ //货物类
     double unit_price; //单价
     int   quantity; //数量
public:
    Goods(double u=0.0, int q=0): unit_price(u),quantity(q){}
    double getPrice()const{ return unit_price; } //返回单价
    int getQuantity()const{ return quantity; } //返回数量
    //增加数量
    Goods operator +(int q)const{ return Goods(unit_price,quantity+q); }
};
//增加数量
Goods operator +(_________________){ return g+q; }
//输出货物信息
ostream& operator<<(ostream& os, Goods g){
    cout<< "单价:"<<g.getPrice()<<','<<"数量:"<< g.getQuantity()<< endl;
    return os;
};
int main() {
    Goods g(35.6, 100); 
    cout<<g<<g+33<<25+g;
    return 0;
}
若运行后的输出结果是:
单价:35.6,数量:100
单价:35.6,数量:133
单价:35.6,数量:125
则程序中下划线处缺失部分应该是(  )。
  • A. Goods q,Goods g
  • B. Goods g,Goods q
  • C. int q,Goods g
  • D. Goods g,int q