reason.txt

来自「本程序给出了SSD5实验课中Exercise6的参考程序 内附有详细的注释 下载」· 文本 代码 · 共 27 行

TXT
27
字号
							Reason Report
			
1. In the class Category:
		vector<Category*> sub_categories;
   changed into 
		set<Category*> sub_categories;
  The reason: The STL set container stores unique items in an ordered collection, the vector<Category*> stores pointers to   	the sub-categories of each category. so it can be changed.

2. In the class Category:
		vector<int> items;
   changed into 
		set<int> items;
   The reason: The STL set container stores unique items in an ordered collection and the vector<int> stores the unique id    	entification numbers of the advertisements that belong to this category. so it can be changed. 

3. In the class Group:
		vector<Client*> container;
   changed into
		map<string,Client*> container;
   The reason: The STL map container is an associative structure that stores data in key-value pairs. Because each client has    	the only eamil as the key string, so it can be changed into STL map.

4. In the class Client:
		vector<int> offerings;
		vector<int> bids;
   changed into
		set<int> offerings;
		set<int> bids;
   The reason:  The STL set container stores unique items in an ordered collection,and the unique integer numbers of the       	advertisements bid on and the advertisements posted are stored in the private vectors bids and offerings. So they can 	be changed.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?